package tg
import (
)
var (
_ = bin.Buffer{}
_ = context.Background()
_ = fmt.Stringer(nil)
_ = strings.Builder{}
_ = errors.Is
_ = multierr.AppendInto
_ = sort.Ints
_ = tdp.Format
_ = tgerr.Error{}
_ = tdjson.Encoder{}
)
type UpdateNewMessage struct {
Message MessageClass
Pts int
PtsCount int
}
const UpdateNewMessageTypeID = 0x1f2b0afd
func ( UpdateNewMessage) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateNewMessage{}
_ bin.Decoder = &UpdateNewMessage{}
_ bin.BareEncoder = &UpdateNewMessage{}
_ bin.BareDecoder = &UpdateNewMessage{}
_ UpdateClass = &UpdateNewMessage{}
)
func ( *UpdateNewMessage) () bool {
if == nil {
return true
}
if !(.Message == nil) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdateNewMessage) () string {
if == nil {
return "UpdateNewMessage(nil)"
}
type UpdateNewMessage
return fmt.Sprintf("UpdateNewMessage%+v", (*))
}
func ( *UpdateNewMessage) ( interface {
() ( MessageClass)
() ( int)
() ( int)
}) {
.Message = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdateNewMessage) () uint32 {
return UpdateNewMessageTypeID
}
func (*UpdateNewMessage) () string {
return "updateNewMessage"
}
func ( *UpdateNewMessage) () tdp.Type {
:= tdp.Type{
Name: "updateNewMessage",
ID: UpdateNewMessageTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Message",
SchemaName: "message",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdateNewMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNewMessage#1f2b0afd as nil")
}
.PutID(UpdateNewMessageTypeID)
return .EncodeBare()
}
func ( *UpdateNewMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNewMessage#1f2b0afd as nil")
}
if .Message == nil {
return fmt.Errorf("unable to encode updateNewMessage#1f2b0afd: field message is nil")
}
if := .Message.Encode(); != nil {
return fmt.Errorf("unable to encode updateNewMessage#1f2b0afd: field message: %w", )
}
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdateNewMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNewMessage#1f2b0afd to nil")
}
if := .ConsumeID(UpdateNewMessageTypeID); != nil {
return fmt.Errorf("unable to decode updateNewMessage#1f2b0afd: %w", )
}
return .DecodeBare()
}
func ( *UpdateNewMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNewMessage#1f2b0afd to nil")
}
{
, := DecodeMessage()
if != nil {
return fmt.Errorf("unable to decode updateNewMessage#1f2b0afd: field message: %w", )
}
.Message =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateNewMessage#1f2b0afd: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateNewMessage#1f2b0afd: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdateNewMessage) () ( MessageClass) {
if == nil {
return
}
return .Message
}
func ( *UpdateNewMessage) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdateNewMessage) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdateMessageID struct {
ID int
RandomID int64
}
const UpdateMessageIDTypeID = 0x4e90bfd6
func ( UpdateMessageID) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateMessageID{}
_ bin.Decoder = &UpdateMessageID{}
_ bin.BareEncoder = &UpdateMessageID{}
_ bin.BareDecoder = &UpdateMessageID{}
_ UpdateClass = &UpdateMessageID{}
)
func ( *UpdateMessageID) () bool {
if == nil {
return true
}
if !(.ID == 0) {
return false
}
if !(.RandomID == 0) {
return false
}
return true
}
func ( *UpdateMessageID) () string {
if == nil {
return "UpdateMessageID(nil)"
}
type UpdateMessageID
return fmt.Sprintf("UpdateMessageID%+v", (*))
}
func ( *UpdateMessageID) ( interface {
() ( int)
() ( int64)
}) {
.ID = .()
.RandomID = .()
}
func (*UpdateMessageID) () uint32 {
return UpdateMessageIDTypeID
}
func (*UpdateMessageID) () string {
return "updateMessageID"
}
func ( *UpdateMessageID) () tdp.Type {
:= tdp.Type{
Name: "updateMessageID",
ID: UpdateMessageIDTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ID",
SchemaName: "id",
},
{
Name: "RandomID",
SchemaName: "random_id",
},
}
return
}
func ( *UpdateMessageID) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateMessageID#4e90bfd6 as nil")
}
.PutID(UpdateMessageIDTypeID)
return .EncodeBare()
}
func ( *UpdateMessageID) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateMessageID#4e90bfd6 as nil")
}
.PutInt(.ID)
.PutLong(.RandomID)
return nil
}
func ( *UpdateMessageID) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateMessageID#4e90bfd6 to nil")
}
if := .ConsumeID(UpdateMessageIDTypeID); != nil {
return fmt.Errorf("unable to decode updateMessageID#4e90bfd6: %w", )
}
return .DecodeBare()
}
func ( *UpdateMessageID) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateMessageID#4e90bfd6 to nil")
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateMessageID#4e90bfd6: field id: %w", )
}
.ID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateMessageID#4e90bfd6: field random_id: %w", )
}
.RandomID =
}
return nil
}
func ( *UpdateMessageID) () ( int) {
if == nil {
return
}
return .ID
}
func ( *UpdateMessageID) () ( int64) {
if == nil {
return
}
return .RandomID
}
type UpdateDeleteMessages struct {
Messages []int
Pts int
PtsCount int
}
const UpdateDeleteMessagesTypeID = 0xa20db0e5
func ( UpdateDeleteMessages) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateDeleteMessages{}
_ bin.Decoder = &UpdateDeleteMessages{}
_ bin.BareEncoder = &UpdateDeleteMessages{}
_ bin.BareDecoder = &UpdateDeleteMessages{}
_ UpdateClass = &UpdateDeleteMessages{}
)
func ( *UpdateDeleteMessages) () bool {
if == nil {
return true
}
if !(.Messages == nil) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdateDeleteMessages) () string {
if == nil {
return "UpdateDeleteMessages(nil)"
}
type UpdateDeleteMessages
return fmt.Sprintf("UpdateDeleteMessages%+v", (*))
}
func ( *UpdateDeleteMessages) ( interface {
() ( []int)
() ( int)
() ( int)
}) {
.Messages = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdateDeleteMessages) () uint32 {
return UpdateDeleteMessagesTypeID
}
func (*UpdateDeleteMessages) () string {
return "updateDeleteMessages"
}
func ( *UpdateDeleteMessages) () tdp.Type {
:= tdp.Type{
Name: "updateDeleteMessages",
ID: UpdateDeleteMessagesTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Messages",
SchemaName: "messages",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdateDeleteMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDeleteMessages#a20db0e5 as nil")
}
.PutID(UpdateDeleteMessagesTypeID)
return .EncodeBare()
}
func ( *UpdateDeleteMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDeleteMessages#a20db0e5 as nil")
}
.PutVectorHeader(len(.Messages))
for , := range .Messages {
.PutInt()
}
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdateDeleteMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDeleteMessages#a20db0e5 to nil")
}
if := .ConsumeID(UpdateDeleteMessagesTypeID); != nil {
return fmt.Errorf("unable to decode updateDeleteMessages#a20db0e5: %w", )
}
return .DecodeBare()
}
func ( *UpdateDeleteMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDeleteMessages#a20db0e5 to nil")
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateDeleteMessages#a20db0e5: field messages: %w", )
}
if > 0 {
.Messages = make([]int, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateDeleteMessages#a20db0e5: field messages: %w", )
}
.Messages = append(.Messages, )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateDeleteMessages#a20db0e5: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateDeleteMessages#a20db0e5: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdateDeleteMessages) () ( []int) {
if == nil {
return
}
return .Messages
}
func ( *UpdateDeleteMessages) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdateDeleteMessages) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdateUserTyping struct {
UserID int64
Action SendMessageActionClass
}
const UpdateUserTypingTypeID = 0xc01e857f
func ( UpdateUserTyping) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateUserTyping{}
_ bin.Decoder = &UpdateUserTyping{}
_ bin.BareEncoder = &UpdateUserTyping{}
_ bin.BareDecoder = &UpdateUserTyping{}
_ UpdateClass = &UpdateUserTyping{}
)
func ( *UpdateUserTyping) () bool {
if == nil {
return true
}
if !(.UserID == 0) {
return false
}
if !(.Action == nil) {
return false
}
return true
}
func ( *UpdateUserTyping) () string {
if == nil {
return "UpdateUserTyping(nil)"
}
type UpdateUserTyping
return fmt.Sprintf("UpdateUserTyping%+v", (*))
}
func ( *UpdateUserTyping) ( interface {
() ( int64)
() ( SendMessageActionClass)
}) {
.UserID = .()
.Action = .()
}
func (*UpdateUserTyping) () uint32 {
return UpdateUserTypingTypeID
}
func (*UpdateUserTyping) () string {
return "updateUserTyping"
}
func ( *UpdateUserTyping) () tdp.Type {
:= tdp.Type{
Name: "updateUserTyping",
ID: UpdateUserTypingTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "Action",
SchemaName: "action",
},
}
return
}
func ( *UpdateUserTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateUserTyping#c01e857f as nil")
}
.PutID(UpdateUserTypingTypeID)
return .EncodeBare()
}
func ( *UpdateUserTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateUserTyping#c01e857f as nil")
}
.PutLong(.UserID)
if .Action == nil {
return fmt.Errorf("unable to encode updateUserTyping#c01e857f: field action is nil")
}
if := .Action.Encode(); != nil {
return fmt.Errorf("unable to encode updateUserTyping#c01e857f: field action: %w", )
}
return nil
}
func ( *UpdateUserTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateUserTyping#c01e857f to nil")
}
if := .ConsumeID(UpdateUserTypingTypeID); != nil {
return fmt.Errorf("unable to decode updateUserTyping#c01e857f: %w", )
}
return .DecodeBare()
}
func ( *UpdateUserTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateUserTyping#c01e857f to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateUserTyping#c01e857f: field user_id: %w", )
}
.UserID =
}
{
, := DecodeSendMessageAction()
if != nil {
return fmt.Errorf("unable to decode updateUserTyping#c01e857f: field action: %w", )
}
.Action =
}
return nil
}
func ( *UpdateUserTyping) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateUserTyping) () ( SendMessageActionClass) {
if == nil {
return
}
return .Action
}
type UpdateChatUserTyping struct {
ChatID int64
FromID PeerClass
Action SendMessageActionClass
}
const UpdateChatUserTypingTypeID = 0x83487af0
func ( UpdateChatUserTyping) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChatUserTyping{}
_ bin.Decoder = &UpdateChatUserTyping{}
_ bin.BareEncoder = &UpdateChatUserTyping{}
_ bin.BareDecoder = &UpdateChatUserTyping{}
_ UpdateClass = &UpdateChatUserTyping{}
)
func ( *UpdateChatUserTyping) () bool {
if == nil {
return true
}
if !(.ChatID == 0) {
return false
}
if !(.FromID == nil) {
return false
}
if !(.Action == nil) {
return false
}
return true
}
func ( *UpdateChatUserTyping) () string {
if == nil {
return "UpdateChatUserTyping(nil)"
}
type UpdateChatUserTyping
return fmt.Sprintf("UpdateChatUserTyping%+v", (*))
}
func ( *UpdateChatUserTyping) ( interface {
() ( int64)
() ( PeerClass)
() ( SendMessageActionClass)
}) {
.ChatID = .()
.FromID = .()
.Action = .()
}
func (*UpdateChatUserTyping) () uint32 {
return UpdateChatUserTypingTypeID
}
func (*UpdateChatUserTyping) () string {
return "updateChatUserTyping"
}
func ( *UpdateChatUserTyping) () tdp.Type {
:= tdp.Type{
Name: "updateChatUserTyping",
ID: UpdateChatUserTypingTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChatID",
SchemaName: "chat_id",
},
{
Name: "FromID",
SchemaName: "from_id",
},
{
Name: "Action",
SchemaName: "action",
},
}
return
}
func ( *UpdateChatUserTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatUserTyping#83487af0 as nil")
}
.PutID(UpdateChatUserTypingTypeID)
return .EncodeBare()
}
func ( *UpdateChatUserTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatUserTyping#83487af0 as nil")
}
.PutLong(.ChatID)
if .FromID == nil {
return fmt.Errorf("unable to encode updateChatUserTyping#83487af0: field from_id is nil")
}
if := .FromID.Encode(); != nil {
return fmt.Errorf("unable to encode updateChatUserTyping#83487af0: field from_id: %w", )
}
if .Action == nil {
return fmt.Errorf("unable to encode updateChatUserTyping#83487af0: field action is nil")
}
if := .Action.Encode(); != nil {
return fmt.Errorf("unable to encode updateChatUserTyping#83487af0: field action: %w", )
}
return nil
}
func ( *UpdateChatUserTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatUserTyping#83487af0 to nil")
}
if := .ConsumeID(UpdateChatUserTypingTypeID); != nil {
return fmt.Errorf("unable to decode updateChatUserTyping#83487af0: %w", )
}
return .DecodeBare()
}
func ( *UpdateChatUserTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatUserTyping#83487af0 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChatUserTyping#83487af0: field chat_id: %w", )
}
.ChatID =
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateChatUserTyping#83487af0: field from_id: %w", )
}
.FromID =
}
{
, := DecodeSendMessageAction()
if != nil {
return fmt.Errorf("unable to decode updateChatUserTyping#83487af0: field action: %w", )
}
.Action =
}
return nil
}
func ( *UpdateChatUserTyping) () ( int64) {
if == nil {
return
}
return .ChatID
}
func ( *UpdateChatUserTyping) () ( PeerClass) {
if == nil {
return
}
return .FromID
}
func ( *UpdateChatUserTyping) () ( SendMessageActionClass) {
if == nil {
return
}
return .Action
}
type UpdateChatParticipants struct {
Participants ChatParticipantsClass
}
const UpdateChatParticipantsTypeID = 0x7761198
func ( UpdateChatParticipants) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChatParticipants{}
_ bin.Decoder = &UpdateChatParticipants{}
_ bin.BareEncoder = &UpdateChatParticipants{}
_ bin.BareDecoder = &UpdateChatParticipants{}
_ UpdateClass = &UpdateChatParticipants{}
)
func ( *UpdateChatParticipants) () bool {
if == nil {
return true
}
if !(.Participants == nil) {
return false
}
return true
}
func ( *UpdateChatParticipants) () string {
if == nil {
return "UpdateChatParticipants(nil)"
}
type UpdateChatParticipants
return fmt.Sprintf("UpdateChatParticipants%+v", (*))
}
func ( *UpdateChatParticipants) ( interface {
() ( ChatParticipantsClass)
}) {
.Participants = .()
}
func (*UpdateChatParticipants) () uint32 {
return UpdateChatParticipantsTypeID
}
func (*UpdateChatParticipants) () string {
return "updateChatParticipants"
}
func ( *UpdateChatParticipants) () tdp.Type {
:= tdp.Type{
Name: "updateChatParticipants",
ID: UpdateChatParticipantsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Participants",
SchemaName: "participants",
},
}
return
}
func ( *UpdateChatParticipants) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatParticipants#7761198 as nil")
}
.PutID(UpdateChatParticipantsTypeID)
return .EncodeBare()
}
func ( *UpdateChatParticipants) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatParticipants#7761198 as nil")
}
if .Participants == nil {
return fmt.Errorf("unable to encode updateChatParticipants#7761198: field participants is nil")
}
if := .Participants.Encode(); != nil {
return fmt.Errorf("unable to encode updateChatParticipants#7761198: field participants: %w", )
}
return nil
}
func ( *UpdateChatParticipants) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatParticipants#7761198 to nil")
}
if := .ConsumeID(UpdateChatParticipantsTypeID); != nil {
return fmt.Errorf("unable to decode updateChatParticipants#7761198: %w", )
}
return .DecodeBare()
}
func ( *UpdateChatParticipants) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatParticipants#7761198 to nil")
}
{
, := DecodeChatParticipants()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipants#7761198: field participants: %w", )
}
.Participants =
}
return nil
}
func ( *UpdateChatParticipants) () ( ChatParticipantsClass) {
if == nil {
return
}
return .Participants
}
type UpdateUserStatus struct {
UserID int64
Status UserStatusClass
}
const UpdateUserStatusTypeID = 0xe5bdf8de
func ( UpdateUserStatus) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateUserStatus{}
_ bin.Decoder = &UpdateUserStatus{}
_ bin.BareEncoder = &UpdateUserStatus{}
_ bin.BareDecoder = &UpdateUserStatus{}
_ UpdateClass = &UpdateUserStatus{}
)
func ( *UpdateUserStatus) () bool {
if == nil {
return true
}
if !(.UserID == 0) {
return false
}
if !(.Status == nil) {
return false
}
return true
}
func ( *UpdateUserStatus) () string {
if == nil {
return "UpdateUserStatus(nil)"
}
type UpdateUserStatus
return fmt.Sprintf("UpdateUserStatus%+v", (*))
}
func ( *UpdateUserStatus) ( interface {
() ( int64)
() ( UserStatusClass)
}) {
.UserID = .()
.Status = .()
}
func (*UpdateUserStatus) () uint32 {
return UpdateUserStatusTypeID
}
func (*UpdateUserStatus) () string {
return "updateUserStatus"
}
func ( *UpdateUserStatus) () tdp.Type {
:= tdp.Type{
Name: "updateUserStatus",
ID: UpdateUserStatusTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "Status",
SchemaName: "status",
},
}
return
}
func ( *UpdateUserStatus) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateUserStatus#e5bdf8de as nil")
}
.PutID(UpdateUserStatusTypeID)
return .EncodeBare()
}
func ( *UpdateUserStatus) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateUserStatus#e5bdf8de as nil")
}
.PutLong(.UserID)
if .Status == nil {
return fmt.Errorf("unable to encode updateUserStatus#e5bdf8de: field status is nil")
}
if := .Status.Encode(); != nil {
return fmt.Errorf("unable to encode updateUserStatus#e5bdf8de: field status: %w", )
}
return nil
}
func ( *UpdateUserStatus) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateUserStatus#e5bdf8de to nil")
}
if := .ConsumeID(UpdateUserStatusTypeID); != nil {
return fmt.Errorf("unable to decode updateUserStatus#e5bdf8de: %w", )
}
return .DecodeBare()
}
func ( *UpdateUserStatus) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateUserStatus#e5bdf8de to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateUserStatus#e5bdf8de: field user_id: %w", )
}
.UserID =
}
{
, := DecodeUserStatus()
if != nil {
return fmt.Errorf("unable to decode updateUserStatus#e5bdf8de: field status: %w", )
}
.Status =
}
return nil
}
func ( *UpdateUserStatus) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateUserStatus) () ( UserStatusClass) {
if == nil {
return
}
return .Status
}
type UpdateUserName struct {
UserID int64
FirstName string
LastName string
Usernames []Username
}
const UpdateUserNameTypeID = 0xa7848924
func ( UpdateUserName) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateUserName{}
_ bin.Decoder = &UpdateUserName{}
_ bin.BareEncoder = &UpdateUserName{}
_ bin.BareDecoder = &UpdateUserName{}
_ UpdateClass = &UpdateUserName{}
)
func ( *UpdateUserName) () bool {
if == nil {
return true
}
if !(.UserID == 0) {
return false
}
if !(.FirstName == "") {
return false
}
if !(.LastName == "") {
return false
}
if !(.Usernames == nil) {
return false
}
return true
}
func ( *UpdateUserName) () string {
if == nil {
return "UpdateUserName(nil)"
}
type UpdateUserName
return fmt.Sprintf("UpdateUserName%+v", (*))
}
func ( *UpdateUserName) ( interface {
() ( int64)
() ( string)
() ( string)
() ( []Username)
}) {
.UserID = .()
.FirstName = .()
.LastName = .()
.Usernames = .()
}
func (*UpdateUserName) () uint32 {
return UpdateUserNameTypeID
}
func (*UpdateUserName) () string {
return "updateUserName"
}
func ( *UpdateUserName) () tdp.Type {
:= tdp.Type{
Name: "updateUserName",
ID: UpdateUserNameTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "FirstName",
SchemaName: "first_name",
},
{
Name: "LastName",
SchemaName: "last_name",
},
{
Name: "Usernames",
SchemaName: "usernames",
},
}
return
}
func ( *UpdateUserName) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateUserName#a7848924 as nil")
}
.PutID(UpdateUserNameTypeID)
return .EncodeBare()
}
func ( *UpdateUserName) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateUserName#a7848924 as nil")
}
.PutLong(.UserID)
.PutString(.FirstName)
.PutString(.LastName)
.PutVectorHeader(len(.Usernames))
for , := range .Usernames {
if := .Encode(); != nil {
return fmt.Errorf("unable to encode updateUserName#a7848924: field usernames element with index %d: %w", , )
}
}
return nil
}
func ( *UpdateUserName) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateUserName#a7848924 to nil")
}
if := .ConsumeID(UpdateUserNameTypeID); != nil {
return fmt.Errorf("unable to decode updateUserName#a7848924: %w", )
}
return .DecodeBare()
}
func ( *UpdateUserName) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateUserName#a7848924 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateUserName#a7848924: field user_id: %w", )
}
.UserID =
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateUserName#a7848924: field first_name: %w", )
}
.FirstName =
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateUserName#a7848924: field last_name: %w", )
}
.LastName =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateUserName#a7848924: field usernames: %w", )
}
if > 0 {
.Usernames = make([]Username, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
var Username
if := .Decode(); != nil {
return fmt.Errorf("unable to decode updateUserName#a7848924: field usernames: %w", )
}
.Usernames = append(.Usernames, )
}
}
return nil
}
func ( *UpdateUserName) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateUserName) () ( string) {
if == nil {
return
}
return .FirstName
}
func ( *UpdateUserName) () ( string) {
if == nil {
return
}
return .LastName
}
func ( *UpdateUserName) () ( []Username) {
if == nil {
return
}
return .Usernames
}
type UpdateNewAuthorization struct {
Flags bin.Fields
Unconfirmed bool
Hash int64
Date int
Device string
Location string
}
const UpdateNewAuthorizationTypeID = 0x8951abef
func ( UpdateNewAuthorization) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateNewAuthorization{}
_ bin.Decoder = &UpdateNewAuthorization{}
_ bin.BareEncoder = &UpdateNewAuthorization{}
_ bin.BareDecoder = &UpdateNewAuthorization{}
_ UpdateClass = &UpdateNewAuthorization{}
)
func ( *UpdateNewAuthorization) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Unconfirmed == false) {
return false
}
if !(.Hash == 0) {
return false
}
if !(.Date == 0) {
return false
}
if !(.Device == "") {
return false
}
if !(.Location == "") {
return false
}
return true
}
func ( *UpdateNewAuthorization) () string {
if == nil {
return "UpdateNewAuthorization(nil)"
}
type UpdateNewAuthorization
return fmt.Sprintf("UpdateNewAuthorization%+v", (*))
}
func ( *UpdateNewAuthorization) ( interface {
() ( bool)
() ( int64)
() ( int, bool)
() ( string, bool)
() ( string, bool)
}) {
.Unconfirmed = .()
.Hash = .()
if , := .(); {
.Date =
}
if , := .(); {
.Device =
}
if , := .(); {
.Location =
}
}
func (*UpdateNewAuthorization) () uint32 {
return UpdateNewAuthorizationTypeID
}
func (*UpdateNewAuthorization) () string {
return "updateNewAuthorization"
}
func ( *UpdateNewAuthorization) () tdp.Type {
:= tdp.Type{
Name: "updateNewAuthorization",
ID: UpdateNewAuthorizationTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Unconfirmed",
SchemaName: "unconfirmed",
Null: !.Flags.Has(0),
},
{
Name: "Hash",
SchemaName: "hash",
},
{
Name: "Date",
SchemaName: "date",
Null: !.Flags.Has(0),
},
{
Name: "Device",
SchemaName: "device",
Null: !.Flags.Has(0),
},
{
Name: "Location",
SchemaName: "location",
Null: !.Flags.Has(0),
},
}
return
}
func ( *UpdateNewAuthorization) () {
if !(.Unconfirmed == false) {
.Flags.Set(0)
}
if !(.Date == 0) {
.Flags.Set(0)
}
if !(.Device == "") {
.Flags.Set(0)
}
if !(.Location == "") {
.Flags.Set(0)
}
}
func ( *UpdateNewAuthorization) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNewAuthorization#8951abef as nil")
}
.PutID(UpdateNewAuthorizationTypeID)
return .EncodeBare()
}
func ( *UpdateNewAuthorization) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNewAuthorization#8951abef as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateNewAuthorization#8951abef: field flags: %w", )
}
.PutLong(.Hash)
if .Flags.Has(0) {
.PutInt(.Date)
}
if .Flags.Has(0) {
.PutString(.Device)
}
if .Flags.Has(0) {
.PutString(.Location)
}
return nil
}
func ( *UpdateNewAuthorization) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNewAuthorization#8951abef to nil")
}
if := .ConsumeID(UpdateNewAuthorizationTypeID); != nil {
return fmt.Errorf("unable to decode updateNewAuthorization#8951abef: %w", )
}
return .DecodeBare()
}
func ( *UpdateNewAuthorization) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNewAuthorization#8951abef to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateNewAuthorization#8951abef: field flags: %w", )
}
}
.Unconfirmed = .Flags.Has(0)
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateNewAuthorization#8951abef: field hash: %w", )
}
.Hash =
}
if .Flags.Has(0) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateNewAuthorization#8951abef: field date: %w", )
}
.Date =
}
if .Flags.Has(0) {
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateNewAuthorization#8951abef: field device: %w", )
}
.Device =
}
if .Flags.Has(0) {
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateNewAuthorization#8951abef: field location: %w", )
}
.Location =
}
return nil
}
func ( *UpdateNewAuthorization) ( bool) {
if {
.Flags.Set(0)
.Unconfirmed = true
} else {
.Flags.Unset(0)
.Unconfirmed = false
}
}
func ( *UpdateNewAuthorization) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdateNewAuthorization) () ( int64) {
if == nil {
return
}
return .Hash
}
func ( *UpdateNewAuthorization) ( int) {
.Flags.Set(0)
.Date =
}
func ( *UpdateNewAuthorization) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Date, true
}
func ( *UpdateNewAuthorization) ( string) {
.Flags.Set(0)
.Device =
}
func ( *UpdateNewAuthorization) () ( string, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Device, true
}
func ( *UpdateNewAuthorization) ( string) {
.Flags.Set(0)
.Location =
}
func ( *UpdateNewAuthorization) () ( string, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Location, true
}
type UpdateNewEncryptedMessage struct {
Message EncryptedMessageClass
Qts int
}
const UpdateNewEncryptedMessageTypeID = 0x12bcbd9a
func ( UpdateNewEncryptedMessage) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateNewEncryptedMessage{}
_ bin.Decoder = &UpdateNewEncryptedMessage{}
_ bin.BareEncoder = &UpdateNewEncryptedMessage{}
_ bin.BareDecoder = &UpdateNewEncryptedMessage{}
_ UpdateClass = &UpdateNewEncryptedMessage{}
)
func ( *UpdateNewEncryptedMessage) () bool {
if == nil {
return true
}
if !(.Message == nil) {
return false
}
if !(.Qts == 0) {
return false
}
return true
}
func ( *UpdateNewEncryptedMessage) () string {
if == nil {
return "UpdateNewEncryptedMessage(nil)"
}
type UpdateNewEncryptedMessage
return fmt.Sprintf("UpdateNewEncryptedMessage%+v", (*))
}
func ( *UpdateNewEncryptedMessage) ( interface {
() ( EncryptedMessageClass)
() ( int)
}) {
.Message = .()
.Qts = .()
}
func (*UpdateNewEncryptedMessage) () uint32 {
return UpdateNewEncryptedMessageTypeID
}
func (*UpdateNewEncryptedMessage) () string {
return "updateNewEncryptedMessage"
}
func ( *UpdateNewEncryptedMessage) () tdp.Type {
:= tdp.Type{
Name: "updateNewEncryptedMessage",
ID: UpdateNewEncryptedMessageTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Message",
SchemaName: "message",
},
{
Name: "Qts",
SchemaName: "qts",
},
}
return
}
func ( *UpdateNewEncryptedMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNewEncryptedMessage#12bcbd9a as nil")
}
.PutID(UpdateNewEncryptedMessageTypeID)
return .EncodeBare()
}
func ( *UpdateNewEncryptedMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNewEncryptedMessage#12bcbd9a as nil")
}
if .Message == nil {
return fmt.Errorf("unable to encode updateNewEncryptedMessage#12bcbd9a: field message is nil")
}
if := .Message.Encode(); != nil {
return fmt.Errorf("unable to encode updateNewEncryptedMessage#12bcbd9a: field message: %w", )
}
.PutInt(.Qts)
return nil
}
func ( *UpdateNewEncryptedMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNewEncryptedMessage#12bcbd9a to nil")
}
if := .ConsumeID(UpdateNewEncryptedMessageTypeID); != nil {
return fmt.Errorf("unable to decode updateNewEncryptedMessage#12bcbd9a: %w", )
}
return .DecodeBare()
}
func ( *UpdateNewEncryptedMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNewEncryptedMessage#12bcbd9a to nil")
}
{
, := DecodeEncryptedMessage()
if != nil {
return fmt.Errorf("unable to decode updateNewEncryptedMessage#12bcbd9a: field message: %w", )
}
.Message =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateNewEncryptedMessage#12bcbd9a: field qts: %w", )
}
.Qts =
}
return nil
}
func ( *UpdateNewEncryptedMessage) () ( EncryptedMessageClass) {
if == nil {
return
}
return .Message
}
func ( *UpdateNewEncryptedMessage) () ( int) {
if == nil {
return
}
return .Qts
}
type UpdateEncryptedChatTyping struct {
ChatID int
}
const UpdateEncryptedChatTypingTypeID = 0x1710f156
func ( UpdateEncryptedChatTyping) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateEncryptedChatTyping{}
_ bin.Decoder = &UpdateEncryptedChatTyping{}
_ bin.BareEncoder = &UpdateEncryptedChatTyping{}
_ bin.BareDecoder = &UpdateEncryptedChatTyping{}
_ UpdateClass = &UpdateEncryptedChatTyping{}
)
func ( *UpdateEncryptedChatTyping) () bool {
if == nil {
return true
}
if !(.ChatID == 0) {
return false
}
return true
}
func ( *UpdateEncryptedChatTyping) () string {
if == nil {
return "UpdateEncryptedChatTyping(nil)"
}
type UpdateEncryptedChatTyping
return fmt.Sprintf("UpdateEncryptedChatTyping%+v", (*))
}
func ( *UpdateEncryptedChatTyping) ( interface {
() ( int)
}) {
.ChatID = .()
}
func (*UpdateEncryptedChatTyping) () uint32 {
return UpdateEncryptedChatTypingTypeID
}
func (*UpdateEncryptedChatTyping) () string {
return "updateEncryptedChatTyping"
}
func ( *UpdateEncryptedChatTyping) () tdp.Type {
:= tdp.Type{
Name: "updateEncryptedChatTyping",
ID: UpdateEncryptedChatTypingTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChatID",
SchemaName: "chat_id",
},
}
return
}
func ( *UpdateEncryptedChatTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateEncryptedChatTyping#1710f156 as nil")
}
.PutID(UpdateEncryptedChatTypingTypeID)
return .EncodeBare()
}
func ( *UpdateEncryptedChatTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateEncryptedChatTyping#1710f156 as nil")
}
.PutInt(.ChatID)
return nil
}
func ( *UpdateEncryptedChatTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateEncryptedChatTyping#1710f156 to nil")
}
if := .ConsumeID(UpdateEncryptedChatTypingTypeID); != nil {
return fmt.Errorf("unable to decode updateEncryptedChatTyping#1710f156: %w", )
}
return .DecodeBare()
}
func ( *UpdateEncryptedChatTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateEncryptedChatTyping#1710f156 to nil")
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateEncryptedChatTyping#1710f156: field chat_id: %w", )
}
.ChatID =
}
return nil
}
func ( *UpdateEncryptedChatTyping) () ( int) {
if == nil {
return
}
return .ChatID
}
type UpdateEncryption struct {
Chat EncryptedChatClass
Date int
}
const UpdateEncryptionTypeID = 0xb4a2e88d
func ( UpdateEncryption) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateEncryption{}
_ bin.Decoder = &UpdateEncryption{}
_ bin.BareEncoder = &UpdateEncryption{}
_ bin.BareDecoder = &UpdateEncryption{}
_ UpdateClass = &UpdateEncryption{}
)
func ( *UpdateEncryption) () bool {
if == nil {
return true
}
if !(.Chat == nil) {
return false
}
if !(.Date == 0) {
return false
}
return true
}
func ( *UpdateEncryption) () string {
if == nil {
return "UpdateEncryption(nil)"
}
type UpdateEncryption
return fmt.Sprintf("UpdateEncryption%+v", (*))
}
func ( *UpdateEncryption) ( interface {
() ( EncryptedChatClass)
() ( int)
}) {
.Chat = .()
.Date = .()
}
func (*UpdateEncryption) () uint32 {
return UpdateEncryptionTypeID
}
func (*UpdateEncryption) () string {
return "updateEncryption"
}
func ( *UpdateEncryption) () tdp.Type {
:= tdp.Type{
Name: "updateEncryption",
ID: UpdateEncryptionTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Chat",
SchemaName: "chat",
},
{
Name: "Date",
SchemaName: "date",
},
}
return
}
func ( *UpdateEncryption) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateEncryption#b4a2e88d as nil")
}
.PutID(UpdateEncryptionTypeID)
return .EncodeBare()
}
func ( *UpdateEncryption) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateEncryption#b4a2e88d as nil")
}
if .Chat == nil {
return fmt.Errorf("unable to encode updateEncryption#b4a2e88d: field chat is nil")
}
if := .Chat.Encode(); != nil {
return fmt.Errorf("unable to encode updateEncryption#b4a2e88d: field chat: %w", )
}
.PutInt(.Date)
return nil
}
func ( *UpdateEncryption) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateEncryption#b4a2e88d to nil")
}
if := .ConsumeID(UpdateEncryptionTypeID); != nil {
return fmt.Errorf("unable to decode updateEncryption#b4a2e88d: %w", )
}
return .DecodeBare()
}
func ( *UpdateEncryption) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateEncryption#b4a2e88d to nil")
}
{
, := DecodeEncryptedChat()
if != nil {
return fmt.Errorf("unable to decode updateEncryption#b4a2e88d: field chat: %w", )
}
.Chat =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateEncryption#b4a2e88d: field date: %w", )
}
.Date =
}
return nil
}
func ( *UpdateEncryption) () ( EncryptedChatClass) {
if == nil {
return
}
return .Chat
}
func ( *UpdateEncryption) () ( int) {
if == nil {
return
}
return .Date
}
type UpdateEncryptedMessagesRead struct {
ChatID int
MaxDate int
Date int
}
const UpdateEncryptedMessagesReadTypeID = 0x38fe25b7
func ( UpdateEncryptedMessagesRead) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateEncryptedMessagesRead{}
_ bin.Decoder = &UpdateEncryptedMessagesRead{}
_ bin.BareEncoder = &UpdateEncryptedMessagesRead{}
_ bin.BareDecoder = &UpdateEncryptedMessagesRead{}
_ UpdateClass = &UpdateEncryptedMessagesRead{}
)
func ( *UpdateEncryptedMessagesRead) () bool {
if == nil {
return true
}
if !(.ChatID == 0) {
return false
}
if !(.MaxDate == 0) {
return false
}
if !(.Date == 0) {
return false
}
return true
}
func ( *UpdateEncryptedMessagesRead) () string {
if == nil {
return "UpdateEncryptedMessagesRead(nil)"
}
type UpdateEncryptedMessagesRead
return fmt.Sprintf("UpdateEncryptedMessagesRead%+v", (*))
}
func ( *UpdateEncryptedMessagesRead) ( interface {
() ( int)
() ( int)
() ( int)
}) {
.ChatID = .()
.MaxDate = .()
.Date = .()
}
func (*UpdateEncryptedMessagesRead) () uint32 {
return UpdateEncryptedMessagesReadTypeID
}
func (*UpdateEncryptedMessagesRead) () string {
return "updateEncryptedMessagesRead"
}
func ( *UpdateEncryptedMessagesRead) () tdp.Type {
:= tdp.Type{
Name: "updateEncryptedMessagesRead",
ID: UpdateEncryptedMessagesReadTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChatID",
SchemaName: "chat_id",
},
{
Name: "MaxDate",
SchemaName: "max_date",
},
{
Name: "Date",
SchemaName: "date",
},
}
return
}
func ( *UpdateEncryptedMessagesRead) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateEncryptedMessagesRead#38fe25b7 as nil")
}
.PutID(UpdateEncryptedMessagesReadTypeID)
return .EncodeBare()
}
func ( *UpdateEncryptedMessagesRead) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateEncryptedMessagesRead#38fe25b7 as nil")
}
.PutInt(.ChatID)
.PutInt(.MaxDate)
.PutInt(.Date)
return nil
}
func ( *UpdateEncryptedMessagesRead) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateEncryptedMessagesRead#38fe25b7 to nil")
}
if := .ConsumeID(UpdateEncryptedMessagesReadTypeID); != nil {
return fmt.Errorf("unable to decode updateEncryptedMessagesRead#38fe25b7: %w", )
}
return .DecodeBare()
}
func ( *UpdateEncryptedMessagesRead) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateEncryptedMessagesRead#38fe25b7 to nil")
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateEncryptedMessagesRead#38fe25b7: field chat_id: %w", )
}
.ChatID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateEncryptedMessagesRead#38fe25b7: field max_date: %w", )
}
.MaxDate =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateEncryptedMessagesRead#38fe25b7: field date: %w", )
}
.Date =
}
return nil
}
func ( *UpdateEncryptedMessagesRead) () ( int) {
if == nil {
return
}
return .ChatID
}
func ( *UpdateEncryptedMessagesRead) () ( int) {
if == nil {
return
}
return .MaxDate
}
func ( *UpdateEncryptedMessagesRead) () ( int) {
if == nil {
return
}
return .Date
}
type UpdateChatParticipantAdd struct {
ChatID int64
UserID int64
InviterID int64
Date int
Version int
}
const UpdateChatParticipantAddTypeID = 0x3dda5451
func ( UpdateChatParticipantAdd) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChatParticipantAdd{}
_ bin.Decoder = &UpdateChatParticipantAdd{}
_ bin.BareEncoder = &UpdateChatParticipantAdd{}
_ bin.BareDecoder = &UpdateChatParticipantAdd{}
_ UpdateClass = &UpdateChatParticipantAdd{}
)
func ( *UpdateChatParticipantAdd) () bool {
if == nil {
return true
}
if !(.ChatID == 0) {
return false
}
if !(.UserID == 0) {
return false
}
if !(.InviterID == 0) {
return false
}
if !(.Date == 0) {
return false
}
if !(.Version == 0) {
return false
}
return true
}
func ( *UpdateChatParticipantAdd) () string {
if == nil {
return "UpdateChatParticipantAdd(nil)"
}
type UpdateChatParticipantAdd
return fmt.Sprintf("UpdateChatParticipantAdd%+v", (*))
}
func ( *UpdateChatParticipantAdd) ( interface {
() ( int64)
() ( int64)
() ( int64)
() ( int)
() ( int)
}) {
.ChatID = .()
.UserID = .()
.InviterID = .()
.Date = .()
.Version = .()
}
func (*UpdateChatParticipantAdd) () uint32 {
return UpdateChatParticipantAddTypeID
}
func (*UpdateChatParticipantAdd) () string {
return "updateChatParticipantAdd"
}
func ( *UpdateChatParticipantAdd) () tdp.Type {
:= tdp.Type{
Name: "updateChatParticipantAdd",
ID: UpdateChatParticipantAddTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChatID",
SchemaName: "chat_id",
},
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "InviterID",
SchemaName: "inviter_id",
},
{
Name: "Date",
SchemaName: "date",
},
{
Name: "Version",
SchemaName: "version",
},
}
return
}
func ( *UpdateChatParticipantAdd) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatParticipantAdd#3dda5451 as nil")
}
.PutID(UpdateChatParticipantAddTypeID)
return .EncodeBare()
}
func ( *UpdateChatParticipantAdd) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatParticipantAdd#3dda5451 as nil")
}
.PutLong(.ChatID)
.PutLong(.UserID)
.PutLong(.InviterID)
.PutInt(.Date)
.PutInt(.Version)
return nil
}
func ( *UpdateChatParticipantAdd) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatParticipantAdd#3dda5451 to nil")
}
if := .ConsumeID(UpdateChatParticipantAddTypeID); != nil {
return fmt.Errorf("unable to decode updateChatParticipantAdd#3dda5451: %w", )
}
return .DecodeBare()
}
func ( *UpdateChatParticipantAdd) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatParticipantAdd#3dda5451 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipantAdd#3dda5451: field chat_id: %w", )
}
.ChatID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipantAdd#3dda5451: field user_id: %w", )
}
.UserID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipantAdd#3dda5451: field inviter_id: %w", )
}
.InviterID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipantAdd#3dda5451: field date: %w", )
}
.Date =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipantAdd#3dda5451: field version: %w", )
}
.Version =
}
return nil
}
func ( *UpdateChatParticipantAdd) () ( int64) {
if == nil {
return
}
return .ChatID
}
func ( *UpdateChatParticipantAdd) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateChatParticipantAdd) () ( int64) {
if == nil {
return
}
return .InviterID
}
func ( *UpdateChatParticipantAdd) () ( int) {
if == nil {
return
}
return .Date
}
func ( *UpdateChatParticipantAdd) () ( int) {
if == nil {
return
}
return .Version
}
type UpdateChatParticipantDelete struct {
ChatID int64
UserID int64
Version int
}
const UpdateChatParticipantDeleteTypeID = 0xe32f3d77
func ( UpdateChatParticipantDelete) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChatParticipantDelete{}
_ bin.Decoder = &UpdateChatParticipantDelete{}
_ bin.BareEncoder = &UpdateChatParticipantDelete{}
_ bin.BareDecoder = &UpdateChatParticipantDelete{}
_ UpdateClass = &UpdateChatParticipantDelete{}
)
func ( *UpdateChatParticipantDelete) () bool {
if == nil {
return true
}
if !(.ChatID == 0) {
return false
}
if !(.UserID == 0) {
return false
}
if !(.Version == 0) {
return false
}
return true
}
func ( *UpdateChatParticipantDelete) () string {
if == nil {
return "UpdateChatParticipantDelete(nil)"
}
type UpdateChatParticipantDelete
return fmt.Sprintf("UpdateChatParticipantDelete%+v", (*))
}
func ( *UpdateChatParticipantDelete) ( interface {
() ( int64)
() ( int64)
() ( int)
}) {
.ChatID = .()
.UserID = .()
.Version = .()
}
func (*UpdateChatParticipantDelete) () uint32 {
return UpdateChatParticipantDeleteTypeID
}
func (*UpdateChatParticipantDelete) () string {
return "updateChatParticipantDelete"
}
func ( *UpdateChatParticipantDelete) () tdp.Type {
:= tdp.Type{
Name: "updateChatParticipantDelete",
ID: UpdateChatParticipantDeleteTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChatID",
SchemaName: "chat_id",
},
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "Version",
SchemaName: "version",
},
}
return
}
func ( *UpdateChatParticipantDelete) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatParticipantDelete#e32f3d77 as nil")
}
.PutID(UpdateChatParticipantDeleteTypeID)
return .EncodeBare()
}
func ( *UpdateChatParticipantDelete) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatParticipantDelete#e32f3d77 as nil")
}
.PutLong(.ChatID)
.PutLong(.UserID)
.PutInt(.Version)
return nil
}
func ( *UpdateChatParticipantDelete) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatParticipantDelete#e32f3d77 to nil")
}
if := .ConsumeID(UpdateChatParticipantDeleteTypeID); != nil {
return fmt.Errorf("unable to decode updateChatParticipantDelete#e32f3d77: %w", )
}
return .DecodeBare()
}
func ( *UpdateChatParticipantDelete) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatParticipantDelete#e32f3d77 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipantDelete#e32f3d77: field chat_id: %w", )
}
.ChatID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipantDelete#e32f3d77: field user_id: %w", )
}
.UserID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipantDelete#e32f3d77: field version: %w", )
}
.Version =
}
return nil
}
func ( *UpdateChatParticipantDelete) () ( int64) {
if == nil {
return
}
return .ChatID
}
func ( *UpdateChatParticipantDelete) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateChatParticipantDelete) () ( int) {
if == nil {
return
}
return .Version
}
type UpdateDCOptions struct {
DCOptions []DCOption
}
const UpdateDCOptionsTypeID = 0x8e5e9873
func ( UpdateDCOptions) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateDCOptions{}
_ bin.Decoder = &UpdateDCOptions{}
_ bin.BareEncoder = &UpdateDCOptions{}
_ bin.BareDecoder = &UpdateDCOptions{}
_ UpdateClass = &UpdateDCOptions{}
)
func ( *UpdateDCOptions) () bool {
if == nil {
return true
}
if !(.DCOptions == nil) {
return false
}
return true
}
func ( *UpdateDCOptions) () string {
if == nil {
return "UpdateDCOptions(nil)"
}
type UpdateDCOptions
return fmt.Sprintf("UpdateDCOptions%+v", (*))
}
func ( *UpdateDCOptions) ( interface {
() ( []DCOption)
}) {
.DCOptions = .()
}
func (*UpdateDCOptions) () uint32 {
return UpdateDCOptionsTypeID
}
func (*UpdateDCOptions) () string {
return "updateDcOptions"
}
func ( *UpdateDCOptions) () tdp.Type {
:= tdp.Type{
Name: "updateDcOptions",
ID: UpdateDCOptionsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "DCOptions",
SchemaName: "dc_options",
},
}
return
}
func ( *UpdateDCOptions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDcOptions#8e5e9873 as nil")
}
.PutID(UpdateDCOptionsTypeID)
return .EncodeBare()
}
func ( *UpdateDCOptions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDcOptions#8e5e9873 as nil")
}
.PutVectorHeader(len(.DCOptions))
for , := range .DCOptions {
if := .Encode(); != nil {
return fmt.Errorf("unable to encode updateDcOptions#8e5e9873: field dc_options element with index %d: %w", , )
}
}
return nil
}
func ( *UpdateDCOptions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDcOptions#8e5e9873 to nil")
}
if := .ConsumeID(UpdateDCOptionsTypeID); != nil {
return fmt.Errorf("unable to decode updateDcOptions#8e5e9873: %w", )
}
return .DecodeBare()
}
func ( *UpdateDCOptions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDcOptions#8e5e9873 to nil")
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateDcOptions#8e5e9873: field dc_options: %w", )
}
if > 0 {
.DCOptions = make([]DCOption, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
var DCOption
if := .Decode(); != nil {
return fmt.Errorf("unable to decode updateDcOptions#8e5e9873: field dc_options: %w", )
}
.DCOptions = append(.DCOptions, )
}
}
return nil
}
func ( *UpdateDCOptions) () ( []DCOption) {
if == nil {
return
}
return .DCOptions
}
type UpdateNotifySettings struct {
Peer NotifyPeerClass
NotifySettings PeerNotifySettings
}
const UpdateNotifySettingsTypeID = 0xbec268ef
func ( UpdateNotifySettings) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateNotifySettings{}
_ bin.Decoder = &UpdateNotifySettings{}
_ bin.BareEncoder = &UpdateNotifySettings{}
_ bin.BareDecoder = &UpdateNotifySettings{}
_ UpdateClass = &UpdateNotifySettings{}
)
func ( *UpdateNotifySettings) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.NotifySettings.Zero()) {
return false
}
return true
}
func ( *UpdateNotifySettings) () string {
if == nil {
return "UpdateNotifySettings(nil)"
}
type UpdateNotifySettings
return fmt.Sprintf("UpdateNotifySettings%+v", (*))
}
func ( *UpdateNotifySettings) ( interface {
() ( NotifyPeerClass)
() ( PeerNotifySettings)
}) {
.Peer = .()
.NotifySettings = .()
}
func (*UpdateNotifySettings) () uint32 {
return UpdateNotifySettingsTypeID
}
func (*UpdateNotifySettings) () string {
return "updateNotifySettings"
}
func ( *UpdateNotifySettings) () tdp.Type {
:= tdp.Type{
Name: "updateNotifySettings",
ID: UpdateNotifySettingsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "NotifySettings",
SchemaName: "notify_settings",
},
}
return
}
func ( *UpdateNotifySettings) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNotifySettings#bec268ef as nil")
}
.PutID(UpdateNotifySettingsTypeID)
return .EncodeBare()
}
func ( *UpdateNotifySettings) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNotifySettings#bec268ef as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateNotifySettings#bec268ef: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateNotifySettings#bec268ef: field peer: %w", )
}
if := .NotifySettings.Encode(); != nil {
return fmt.Errorf("unable to encode updateNotifySettings#bec268ef: field notify_settings: %w", )
}
return nil
}
func ( *UpdateNotifySettings) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNotifySettings#bec268ef to nil")
}
if := .ConsumeID(UpdateNotifySettingsTypeID); != nil {
return fmt.Errorf("unable to decode updateNotifySettings#bec268ef: %w", )
}
return .DecodeBare()
}
func ( *UpdateNotifySettings) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNotifySettings#bec268ef to nil")
}
{
, := DecodeNotifyPeer()
if != nil {
return fmt.Errorf("unable to decode updateNotifySettings#bec268ef: field peer: %w", )
}
.Peer =
}
{
if := .NotifySettings.Decode(); != nil {
return fmt.Errorf("unable to decode updateNotifySettings#bec268ef: field notify_settings: %w", )
}
}
return nil
}
func ( *UpdateNotifySettings) () ( NotifyPeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateNotifySettings) () ( PeerNotifySettings) {
if == nil {
return
}
return .NotifySettings
}
type UpdateServiceNotification struct {
Flags bin.Fields
Popup bool
InvertMedia bool
InboxDate int
Type string
Message string
Media MessageMediaClass
Entities []MessageEntityClass
}
const UpdateServiceNotificationTypeID = 0xebe46819
func ( UpdateServiceNotification) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateServiceNotification{}
_ bin.Decoder = &UpdateServiceNotification{}
_ bin.BareEncoder = &UpdateServiceNotification{}
_ bin.BareDecoder = &UpdateServiceNotification{}
_ UpdateClass = &UpdateServiceNotification{}
)
func ( *UpdateServiceNotification) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Popup == false) {
return false
}
if !(.InvertMedia == false) {
return false
}
if !(.InboxDate == 0) {
return false
}
if !(.Type == "") {
return false
}
if !(.Message == "") {
return false
}
if !(.Media == nil) {
return false
}
if !(.Entities == nil) {
return false
}
return true
}
func ( *UpdateServiceNotification) () string {
if == nil {
return "UpdateServiceNotification(nil)"
}
type UpdateServiceNotification
return fmt.Sprintf("UpdateServiceNotification%+v", (*))
}
func ( *UpdateServiceNotification) ( interface {
() ( bool)
() ( bool)
() ( int, bool)
() ( string)
() ( string)
() ( MessageMediaClass)
() ( []MessageEntityClass)
}) {
.Popup = .()
.InvertMedia = .()
if , := .(); {
.InboxDate =
}
.Type = .()
.Message = .()
.Media = .()
.Entities = .()
}
func (*UpdateServiceNotification) () uint32 {
return UpdateServiceNotificationTypeID
}
func (*UpdateServiceNotification) () string {
return "updateServiceNotification"
}
func ( *UpdateServiceNotification) () tdp.Type {
:= tdp.Type{
Name: "updateServiceNotification",
ID: UpdateServiceNotificationTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Popup",
SchemaName: "popup",
Null: !.Flags.Has(0),
},
{
Name: "InvertMedia",
SchemaName: "invert_media",
Null: !.Flags.Has(2),
},
{
Name: "InboxDate",
SchemaName: "inbox_date",
Null: !.Flags.Has(1),
},
{
Name: "Type",
SchemaName: "type",
},
{
Name: "Message",
SchemaName: "message",
},
{
Name: "Media",
SchemaName: "media",
},
{
Name: "Entities",
SchemaName: "entities",
},
}
return
}
func ( *UpdateServiceNotification) () {
if !(.Popup == false) {
.Flags.Set(0)
}
if !(.InvertMedia == false) {
.Flags.Set(2)
}
if !(.InboxDate == 0) {
.Flags.Set(1)
}
}
func ( *UpdateServiceNotification) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateServiceNotification#ebe46819 as nil")
}
.PutID(UpdateServiceNotificationTypeID)
return .EncodeBare()
}
func ( *UpdateServiceNotification) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateServiceNotification#ebe46819 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateServiceNotification#ebe46819: field flags: %w", )
}
if .Flags.Has(1) {
.PutInt(.InboxDate)
}
.PutString(.Type)
.PutString(.Message)
if .Media == nil {
return fmt.Errorf("unable to encode updateServiceNotification#ebe46819: field media is nil")
}
if := .Media.Encode(); != nil {
return fmt.Errorf("unable to encode updateServiceNotification#ebe46819: field media: %w", )
}
.PutVectorHeader(len(.Entities))
for , := range .Entities {
if == nil {
return fmt.Errorf("unable to encode updateServiceNotification#ebe46819: field entities element with index %d is nil", )
}
if := .Encode(); != nil {
return fmt.Errorf("unable to encode updateServiceNotification#ebe46819: field entities element with index %d: %w", , )
}
}
return nil
}
func ( *UpdateServiceNotification) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateServiceNotification#ebe46819 to nil")
}
if := .ConsumeID(UpdateServiceNotificationTypeID); != nil {
return fmt.Errorf("unable to decode updateServiceNotification#ebe46819: %w", )
}
return .DecodeBare()
}
func ( *UpdateServiceNotification) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateServiceNotification#ebe46819 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateServiceNotification#ebe46819: field flags: %w", )
}
}
.Popup = .Flags.Has(0)
.InvertMedia = .Flags.Has(2)
if .Flags.Has(1) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateServiceNotification#ebe46819: field inbox_date: %w", )
}
.InboxDate =
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateServiceNotification#ebe46819: field type: %w", )
}
.Type =
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateServiceNotification#ebe46819: field message: %w", )
}
.Message =
}
{
, := DecodeMessageMedia()
if != nil {
return fmt.Errorf("unable to decode updateServiceNotification#ebe46819: field media: %w", )
}
.Media =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateServiceNotification#ebe46819: field entities: %w", )
}
if > 0 {
.Entities = make([]MessageEntityClass, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := DecodeMessageEntity()
if != nil {
return fmt.Errorf("unable to decode updateServiceNotification#ebe46819: field entities: %w", )
}
.Entities = append(.Entities, )
}
}
return nil
}
func ( *UpdateServiceNotification) ( bool) {
if {
.Flags.Set(0)
.Popup = true
} else {
.Flags.Unset(0)
.Popup = false
}
}
func ( *UpdateServiceNotification) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdateServiceNotification) ( bool) {
if {
.Flags.Set(2)
.InvertMedia = true
} else {
.Flags.Unset(2)
.InvertMedia = false
}
}
func ( *UpdateServiceNotification) () ( bool) {
if == nil {
return
}
return .Flags.Has(2)
}
func ( *UpdateServiceNotification) ( int) {
.Flags.Set(1)
.InboxDate =
}
func ( *UpdateServiceNotification) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(1) {
return , false
}
return .InboxDate, true
}
func ( *UpdateServiceNotification) () ( string) {
if == nil {
return
}
return .Type
}
func ( *UpdateServiceNotification) () ( string) {
if == nil {
return
}
return .Message
}
func ( *UpdateServiceNotification) () ( MessageMediaClass) {
if == nil {
return
}
return .Media
}
func ( *UpdateServiceNotification) () ( []MessageEntityClass) {
if == nil {
return
}
return .Entities
}
func ( *UpdateServiceNotification) () ( MessageEntityClassArray) {
return MessageEntityClassArray(.Entities)
}
type UpdatePrivacy struct {
Key PrivacyKeyClass
Rules []PrivacyRuleClass
}
const UpdatePrivacyTypeID = 0xee3b272a
func ( UpdatePrivacy) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePrivacy{}
_ bin.Decoder = &UpdatePrivacy{}
_ bin.BareEncoder = &UpdatePrivacy{}
_ bin.BareDecoder = &UpdatePrivacy{}
_ UpdateClass = &UpdatePrivacy{}
)
func ( *UpdatePrivacy) () bool {
if == nil {
return true
}
if !(.Key == nil) {
return false
}
if !(.Rules == nil) {
return false
}
return true
}
func ( *UpdatePrivacy) () string {
if == nil {
return "UpdatePrivacy(nil)"
}
type UpdatePrivacy
return fmt.Sprintf("UpdatePrivacy%+v", (*))
}
func ( *UpdatePrivacy) ( interface {
() ( PrivacyKeyClass)
() ( []PrivacyRuleClass)
}) {
.Key = .()
.Rules = .()
}
func (*UpdatePrivacy) () uint32 {
return UpdatePrivacyTypeID
}
func (*UpdatePrivacy) () string {
return "updatePrivacy"
}
func ( *UpdatePrivacy) () tdp.Type {
:= tdp.Type{
Name: "updatePrivacy",
ID: UpdatePrivacyTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Key",
SchemaName: "key",
},
{
Name: "Rules",
SchemaName: "rules",
},
}
return
}
func ( *UpdatePrivacy) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePrivacy#ee3b272a as nil")
}
.PutID(UpdatePrivacyTypeID)
return .EncodeBare()
}
func ( *UpdatePrivacy) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePrivacy#ee3b272a as nil")
}
if .Key == nil {
return fmt.Errorf("unable to encode updatePrivacy#ee3b272a: field key is nil")
}
if := .Key.Encode(); != nil {
return fmt.Errorf("unable to encode updatePrivacy#ee3b272a: field key: %w", )
}
.PutVectorHeader(len(.Rules))
for , := range .Rules {
if == nil {
return fmt.Errorf("unable to encode updatePrivacy#ee3b272a: field rules element with index %d is nil", )
}
if := .Encode(); != nil {
return fmt.Errorf("unable to encode updatePrivacy#ee3b272a: field rules element with index %d: %w", , )
}
}
return nil
}
func ( *UpdatePrivacy) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePrivacy#ee3b272a to nil")
}
if := .ConsumeID(UpdatePrivacyTypeID); != nil {
return fmt.Errorf("unable to decode updatePrivacy#ee3b272a: %w", )
}
return .DecodeBare()
}
func ( *UpdatePrivacy) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePrivacy#ee3b272a to nil")
}
{
, := DecodePrivacyKey()
if != nil {
return fmt.Errorf("unable to decode updatePrivacy#ee3b272a: field key: %w", )
}
.Key =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updatePrivacy#ee3b272a: field rules: %w", )
}
if > 0 {
.Rules = make([]PrivacyRuleClass, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := DecodePrivacyRule()
if != nil {
return fmt.Errorf("unable to decode updatePrivacy#ee3b272a: field rules: %w", )
}
.Rules = append(.Rules, )
}
}
return nil
}
func ( *UpdatePrivacy) () ( PrivacyKeyClass) {
if == nil {
return
}
return .Key
}
func ( *UpdatePrivacy) () ( []PrivacyRuleClass) {
if == nil {
return
}
return .Rules
}
func ( *UpdatePrivacy) () ( PrivacyRuleClassArray) {
return PrivacyRuleClassArray(.Rules)
}
type UpdateUserPhone struct {
UserID int64
Phone string
}
const UpdateUserPhoneTypeID = 0x5492a13
func ( UpdateUserPhone) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateUserPhone{}
_ bin.Decoder = &UpdateUserPhone{}
_ bin.BareEncoder = &UpdateUserPhone{}
_ bin.BareDecoder = &UpdateUserPhone{}
_ UpdateClass = &UpdateUserPhone{}
)
func ( *UpdateUserPhone) () bool {
if == nil {
return true
}
if !(.UserID == 0) {
return false
}
if !(.Phone == "") {
return false
}
return true
}
func ( *UpdateUserPhone) () string {
if == nil {
return "UpdateUserPhone(nil)"
}
type UpdateUserPhone
return fmt.Sprintf("UpdateUserPhone%+v", (*))
}
func ( *UpdateUserPhone) ( interface {
() ( int64)
() ( string)
}) {
.UserID = .()
.Phone = .()
}
func (*UpdateUserPhone) () uint32 {
return UpdateUserPhoneTypeID
}
func (*UpdateUserPhone) () string {
return "updateUserPhone"
}
func ( *UpdateUserPhone) () tdp.Type {
:= tdp.Type{
Name: "updateUserPhone",
ID: UpdateUserPhoneTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "Phone",
SchemaName: "phone",
},
}
return
}
func ( *UpdateUserPhone) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateUserPhone#5492a13 as nil")
}
.PutID(UpdateUserPhoneTypeID)
return .EncodeBare()
}
func ( *UpdateUserPhone) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateUserPhone#5492a13 as nil")
}
.PutLong(.UserID)
.PutString(.Phone)
return nil
}
func ( *UpdateUserPhone) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateUserPhone#5492a13 to nil")
}
if := .ConsumeID(UpdateUserPhoneTypeID); != nil {
return fmt.Errorf("unable to decode updateUserPhone#5492a13: %w", )
}
return .DecodeBare()
}
func ( *UpdateUserPhone) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateUserPhone#5492a13 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateUserPhone#5492a13: field user_id: %w", )
}
.UserID =
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateUserPhone#5492a13: field phone: %w", )
}
.Phone =
}
return nil
}
func ( *UpdateUserPhone) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateUserPhone) () ( string) {
if == nil {
return
}
return .Phone
}
type UpdateReadHistoryInbox struct {
Flags bin.Fields
FolderID int
Peer PeerClass
MaxID int
StillUnreadCount int
Pts int
PtsCount int
}
const UpdateReadHistoryInboxTypeID = 0x9c974fdf
func ( UpdateReadHistoryInbox) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateReadHistoryInbox{}
_ bin.Decoder = &UpdateReadHistoryInbox{}
_ bin.BareEncoder = &UpdateReadHistoryInbox{}
_ bin.BareDecoder = &UpdateReadHistoryInbox{}
_ UpdateClass = &UpdateReadHistoryInbox{}
)
func ( *UpdateReadHistoryInbox) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.FolderID == 0) {
return false
}
if !(.Peer == nil) {
return false
}
if !(.MaxID == 0) {
return false
}
if !(.StillUnreadCount == 0) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdateReadHistoryInbox) () string {
if == nil {
return "UpdateReadHistoryInbox(nil)"
}
type UpdateReadHistoryInbox
return fmt.Sprintf("UpdateReadHistoryInbox%+v", (*))
}
func ( *UpdateReadHistoryInbox) ( interface {
() ( int, bool)
() ( PeerClass)
() ( int)
() ( int)
() ( int)
() ( int)
}) {
if , := .(); {
.FolderID =
}
.Peer = .()
.MaxID = .()
.StillUnreadCount = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdateReadHistoryInbox) () uint32 {
return UpdateReadHistoryInboxTypeID
}
func (*UpdateReadHistoryInbox) () string {
return "updateReadHistoryInbox"
}
func ( *UpdateReadHistoryInbox) () tdp.Type {
:= tdp.Type{
Name: "updateReadHistoryInbox",
ID: UpdateReadHistoryInboxTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "FolderID",
SchemaName: "folder_id",
Null: !.Flags.Has(0),
},
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "MaxID",
SchemaName: "max_id",
},
{
Name: "StillUnreadCount",
SchemaName: "still_unread_count",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdateReadHistoryInbox) () {
if !(.FolderID == 0) {
.Flags.Set(0)
}
}
func ( *UpdateReadHistoryInbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadHistoryInbox#9c974fdf as nil")
}
.PutID(UpdateReadHistoryInboxTypeID)
return .EncodeBare()
}
func ( *UpdateReadHistoryInbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadHistoryInbox#9c974fdf as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateReadHistoryInbox#9c974fdf: field flags: %w", )
}
if .Flags.Has(0) {
.PutInt(.FolderID)
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateReadHistoryInbox#9c974fdf: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateReadHistoryInbox#9c974fdf: field peer: %w", )
}
.PutInt(.MaxID)
.PutInt(.StillUnreadCount)
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdateReadHistoryInbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadHistoryInbox#9c974fdf to nil")
}
if := .ConsumeID(UpdateReadHistoryInboxTypeID); != nil {
return fmt.Errorf("unable to decode updateReadHistoryInbox#9c974fdf: %w", )
}
return .DecodeBare()
}
func ( *UpdateReadHistoryInbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadHistoryInbox#9c974fdf to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateReadHistoryInbox#9c974fdf: field flags: %w", )
}
}
if .Flags.Has(0) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadHistoryInbox#9c974fdf: field folder_id: %w", )
}
.FolderID =
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateReadHistoryInbox#9c974fdf: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadHistoryInbox#9c974fdf: field max_id: %w", )
}
.MaxID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadHistoryInbox#9c974fdf: field still_unread_count: %w", )
}
.StillUnreadCount =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadHistoryInbox#9c974fdf: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadHistoryInbox#9c974fdf: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdateReadHistoryInbox) ( int) {
.Flags.Set(0)
.FolderID =
}
func ( *UpdateReadHistoryInbox) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .FolderID, true
}
func ( *UpdateReadHistoryInbox) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateReadHistoryInbox) () ( int) {
if == nil {
return
}
return .MaxID
}
func ( *UpdateReadHistoryInbox) () ( int) {
if == nil {
return
}
return .StillUnreadCount
}
func ( *UpdateReadHistoryInbox) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdateReadHistoryInbox) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdateReadHistoryOutbox struct {
Peer PeerClass
MaxID int
Pts int
PtsCount int
}
const UpdateReadHistoryOutboxTypeID = 0x2f2f21bf
func ( UpdateReadHistoryOutbox) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateReadHistoryOutbox{}
_ bin.Decoder = &UpdateReadHistoryOutbox{}
_ bin.BareEncoder = &UpdateReadHistoryOutbox{}
_ bin.BareDecoder = &UpdateReadHistoryOutbox{}
_ UpdateClass = &UpdateReadHistoryOutbox{}
)
func ( *UpdateReadHistoryOutbox) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.MaxID == 0) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdateReadHistoryOutbox) () string {
if == nil {
return "UpdateReadHistoryOutbox(nil)"
}
type UpdateReadHistoryOutbox
return fmt.Sprintf("UpdateReadHistoryOutbox%+v", (*))
}
func ( *UpdateReadHistoryOutbox) ( interface {
() ( PeerClass)
() ( int)
() ( int)
() ( int)
}) {
.Peer = .()
.MaxID = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdateReadHistoryOutbox) () uint32 {
return UpdateReadHistoryOutboxTypeID
}
func (*UpdateReadHistoryOutbox) () string {
return "updateReadHistoryOutbox"
}
func ( *UpdateReadHistoryOutbox) () tdp.Type {
:= tdp.Type{
Name: "updateReadHistoryOutbox",
ID: UpdateReadHistoryOutboxTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "MaxID",
SchemaName: "max_id",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdateReadHistoryOutbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadHistoryOutbox#2f2f21bf as nil")
}
.PutID(UpdateReadHistoryOutboxTypeID)
return .EncodeBare()
}
func ( *UpdateReadHistoryOutbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadHistoryOutbox#2f2f21bf as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateReadHistoryOutbox#2f2f21bf: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateReadHistoryOutbox#2f2f21bf: field peer: %w", )
}
.PutInt(.MaxID)
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdateReadHistoryOutbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadHistoryOutbox#2f2f21bf to nil")
}
if := .ConsumeID(UpdateReadHistoryOutboxTypeID); != nil {
return fmt.Errorf("unable to decode updateReadHistoryOutbox#2f2f21bf: %w", )
}
return .DecodeBare()
}
func ( *UpdateReadHistoryOutbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadHistoryOutbox#2f2f21bf to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateReadHistoryOutbox#2f2f21bf: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadHistoryOutbox#2f2f21bf: field max_id: %w", )
}
.MaxID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadHistoryOutbox#2f2f21bf: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadHistoryOutbox#2f2f21bf: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdateReadHistoryOutbox) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateReadHistoryOutbox) () ( int) {
if == nil {
return
}
return .MaxID
}
func ( *UpdateReadHistoryOutbox) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdateReadHistoryOutbox) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdateWebPage struct {
Webpage WebPageClass
Pts int
PtsCount int
}
const UpdateWebPageTypeID = 0x7f891213
func ( UpdateWebPage) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateWebPage{}
_ bin.Decoder = &UpdateWebPage{}
_ bin.BareEncoder = &UpdateWebPage{}
_ bin.BareDecoder = &UpdateWebPage{}
_ UpdateClass = &UpdateWebPage{}
)
func ( *UpdateWebPage) () bool {
if == nil {
return true
}
if !(.Webpage == nil) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdateWebPage) () string {
if == nil {
return "UpdateWebPage(nil)"
}
type UpdateWebPage
return fmt.Sprintf("UpdateWebPage%+v", (*))
}
func ( *UpdateWebPage) ( interface {
() ( WebPageClass)
() ( int)
() ( int)
}) {
.Webpage = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdateWebPage) () uint32 {
return UpdateWebPageTypeID
}
func (*UpdateWebPage) () string {
return "updateWebPage"
}
func ( *UpdateWebPage) () tdp.Type {
:= tdp.Type{
Name: "updateWebPage",
ID: UpdateWebPageTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Webpage",
SchemaName: "webpage",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdateWebPage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateWebPage#7f891213 as nil")
}
.PutID(UpdateWebPageTypeID)
return .EncodeBare()
}
func ( *UpdateWebPage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateWebPage#7f891213 as nil")
}
if .Webpage == nil {
return fmt.Errorf("unable to encode updateWebPage#7f891213: field webpage is nil")
}
if := .Webpage.Encode(); != nil {
return fmt.Errorf("unable to encode updateWebPage#7f891213: field webpage: %w", )
}
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdateWebPage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateWebPage#7f891213 to nil")
}
if := .ConsumeID(UpdateWebPageTypeID); != nil {
return fmt.Errorf("unable to decode updateWebPage#7f891213: %w", )
}
return .DecodeBare()
}
func ( *UpdateWebPage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateWebPage#7f891213 to nil")
}
{
, := DecodeWebPage()
if != nil {
return fmt.Errorf("unable to decode updateWebPage#7f891213: field webpage: %w", )
}
.Webpage =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateWebPage#7f891213: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateWebPage#7f891213: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdateWebPage) () ( WebPageClass) {
if == nil {
return
}
return .Webpage
}
func ( *UpdateWebPage) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdateWebPage) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdateReadMessagesContents struct {
Flags bin.Fields
Messages []int
Pts int
PtsCount int
Date int
}
const UpdateReadMessagesContentsTypeID = 0xf8227181
func ( UpdateReadMessagesContents) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateReadMessagesContents{}
_ bin.Decoder = &UpdateReadMessagesContents{}
_ bin.BareEncoder = &UpdateReadMessagesContents{}
_ bin.BareDecoder = &UpdateReadMessagesContents{}
_ UpdateClass = &UpdateReadMessagesContents{}
)
func ( *UpdateReadMessagesContents) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Messages == nil) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
if !(.Date == 0) {
return false
}
return true
}
func ( *UpdateReadMessagesContents) () string {
if == nil {
return "UpdateReadMessagesContents(nil)"
}
type UpdateReadMessagesContents
return fmt.Sprintf("UpdateReadMessagesContents%+v", (*))
}
func ( *UpdateReadMessagesContents) ( interface {
() ( []int)
() ( int)
() ( int)
() ( int, bool)
}) {
.Messages = .()
.Pts = .()
.PtsCount = .()
if , := .(); {
.Date =
}
}
func (*UpdateReadMessagesContents) () uint32 {
return UpdateReadMessagesContentsTypeID
}
func (*UpdateReadMessagesContents) () string {
return "updateReadMessagesContents"
}
func ( *UpdateReadMessagesContents) () tdp.Type {
:= tdp.Type{
Name: "updateReadMessagesContents",
ID: UpdateReadMessagesContentsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Messages",
SchemaName: "messages",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
{
Name: "Date",
SchemaName: "date",
Null: !.Flags.Has(0),
},
}
return
}
func ( *UpdateReadMessagesContents) () {
if !(.Date == 0) {
.Flags.Set(0)
}
}
func ( *UpdateReadMessagesContents) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadMessagesContents#f8227181 as nil")
}
.PutID(UpdateReadMessagesContentsTypeID)
return .EncodeBare()
}
func ( *UpdateReadMessagesContents) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadMessagesContents#f8227181 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateReadMessagesContents#f8227181: field flags: %w", )
}
.PutVectorHeader(len(.Messages))
for , := range .Messages {
.PutInt()
}
.PutInt(.Pts)
.PutInt(.PtsCount)
if .Flags.Has(0) {
.PutInt(.Date)
}
return nil
}
func ( *UpdateReadMessagesContents) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadMessagesContents#f8227181 to nil")
}
if := .ConsumeID(UpdateReadMessagesContentsTypeID); != nil {
return fmt.Errorf("unable to decode updateReadMessagesContents#f8227181: %w", )
}
return .DecodeBare()
}
func ( *UpdateReadMessagesContents) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadMessagesContents#f8227181 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateReadMessagesContents#f8227181: field flags: %w", )
}
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateReadMessagesContents#f8227181: field messages: %w", )
}
if > 0 {
.Messages = make([]int, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadMessagesContents#f8227181: field messages: %w", )
}
.Messages = append(.Messages, )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadMessagesContents#f8227181: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadMessagesContents#f8227181: field pts_count: %w", )
}
.PtsCount =
}
if .Flags.Has(0) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadMessagesContents#f8227181: field date: %w", )
}
.Date =
}
return nil
}
func ( *UpdateReadMessagesContents) () ( []int) {
if == nil {
return
}
return .Messages
}
func ( *UpdateReadMessagesContents) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdateReadMessagesContents) () ( int) {
if == nil {
return
}
return .PtsCount
}
func ( *UpdateReadMessagesContents) ( int) {
.Flags.Set(0)
.Date =
}
func ( *UpdateReadMessagesContents) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Date, true
}
type UpdateChannelTooLong struct {
Flags bin.Fields
ChannelID int64
Pts int
}
const UpdateChannelTooLongTypeID = 0x108d941f
func ( UpdateChannelTooLong) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChannelTooLong{}
_ bin.Decoder = &UpdateChannelTooLong{}
_ bin.BareEncoder = &UpdateChannelTooLong{}
_ bin.BareDecoder = &UpdateChannelTooLong{}
_ UpdateClass = &UpdateChannelTooLong{}
)
func ( *UpdateChannelTooLong) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.ChannelID == 0) {
return false
}
if !(.Pts == 0) {
return false
}
return true
}
func ( *UpdateChannelTooLong) () string {
if == nil {
return "UpdateChannelTooLong(nil)"
}
type UpdateChannelTooLong
return fmt.Sprintf("UpdateChannelTooLong%+v", (*))
}
func ( *UpdateChannelTooLong) ( interface {
() ( int64)
() ( int, bool)
}) {
.ChannelID = .()
if , := .(); {
.Pts =
}
}
func (*UpdateChannelTooLong) () uint32 {
return UpdateChannelTooLongTypeID
}
func (*UpdateChannelTooLong) () string {
return "updateChannelTooLong"
}
func ( *UpdateChannelTooLong) () tdp.Type {
:= tdp.Type{
Name: "updateChannelTooLong",
ID: UpdateChannelTooLongTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "Pts",
SchemaName: "pts",
Null: !.Flags.Has(0),
},
}
return
}
func ( *UpdateChannelTooLong) () {
if !(.Pts == 0) {
.Flags.Set(0)
}
}
func ( *UpdateChannelTooLong) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelTooLong#108d941f as nil")
}
.PutID(UpdateChannelTooLongTypeID)
return .EncodeBare()
}
func ( *UpdateChannelTooLong) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelTooLong#108d941f as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateChannelTooLong#108d941f: field flags: %w", )
}
.PutLong(.ChannelID)
if .Flags.Has(0) {
.PutInt(.Pts)
}
return nil
}
func ( *UpdateChannelTooLong) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelTooLong#108d941f to nil")
}
if := .ConsumeID(UpdateChannelTooLongTypeID); != nil {
return fmt.Errorf("unable to decode updateChannelTooLong#108d941f: %w", )
}
return .DecodeBare()
}
func ( *UpdateChannelTooLong) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelTooLong#108d941f to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateChannelTooLong#108d941f: field flags: %w", )
}
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelTooLong#108d941f: field channel_id: %w", )
}
.ChannelID =
}
if .Flags.Has(0) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelTooLong#108d941f: field pts: %w", )
}
.Pts =
}
return nil
}
func ( *UpdateChannelTooLong) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateChannelTooLong) ( int) {
.Flags.Set(0)
.Pts =
}
func ( *UpdateChannelTooLong) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Pts, true
}
type UpdateChannel struct {
ChannelID int64
}
const UpdateChannelTypeID = 0x635b4c09
func ( UpdateChannel) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChannel{}
_ bin.Decoder = &UpdateChannel{}
_ bin.BareEncoder = &UpdateChannel{}
_ bin.BareDecoder = &UpdateChannel{}
_ UpdateClass = &UpdateChannel{}
)
func ( *UpdateChannel) () bool {
if == nil {
return true
}
if !(.ChannelID == 0) {
return false
}
return true
}
func ( *UpdateChannel) () string {
if == nil {
return "UpdateChannel(nil)"
}
type UpdateChannel
return fmt.Sprintf("UpdateChannel%+v", (*))
}
func ( *UpdateChannel) ( interface {
() ( int64)
}) {
.ChannelID = .()
}
func (*UpdateChannel) () uint32 {
return UpdateChannelTypeID
}
func (*UpdateChannel) () string {
return "updateChannel"
}
func ( *UpdateChannel) () tdp.Type {
:= tdp.Type{
Name: "updateChannel",
ID: UpdateChannelTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
}
return
}
func ( *UpdateChannel) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannel#635b4c09 as nil")
}
.PutID(UpdateChannelTypeID)
return .EncodeBare()
}
func ( *UpdateChannel) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannel#635b4c09 as nil")
}
.PutLong(.ChannelID)
return nil
}
func ( *UpdateChannel) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannel#635b4c09 to nil")
}
if := .ConsumeID(UpdateChannelTypeID); != nil {
return fmt.Errorf("unable to decode updateChannel#635b4c09: %w", )
}
return .DecodeBare()
}
func ( *UpdateChannel) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannel#635b4c09 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannel#635b4c09: field channel_id: %w", )
}
.ChannelID =
}
return nil
}
func ( *UpdateChannel) () ( int64) {
if == nil {
return
}
return .ChannelID
}
type UpdateNewChannelMessage struct {
Message MessageClass
Pts int
PtsCount int
}
const UpdateNewChannelMessageTypeID = 0x62ba04d9
func ( UpdateNewChannelMessage) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateNewChannelMessage{}
_ bin.Decoder = &UpdateNewChannelMessage{}
_ bin.BareEncoder = &UpdateNewChannelMessage{}
_ bin.BareDecoder = &UpdateNewChannelMessage{}
_ UpdateClass = &UpdateNewChannelMessage{}
)
func ( *UpdateNewChannelMessage) () bool {
if == nil {
return true
}
if !(.Message == nil) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdateNewChannelMessage) () string {
if == nil {
return "UpdateNewChannelMessage(nil)"
}
type UpdateNewChannelMessage
return fmt.Sprintf("UpdateNewChannelMessage%+v", (*))
}
func ( *UpdateNewChannelMessage) ( interface {
() ( MessageClass)
() ( int)
() ( int)
}) {
.Message = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdateNewChannelMessage) () uint32 {
return UpdateNewChannelMessageTypeID
}
func (*UpdateNewChannelMessage) () string {
return "updateNewChannelMessage"
}
func ( *UpdateNewChannelMessage) () tdp.Type {
:= tdp.Type{
Name: "updateNewChannelMessage",
ID: UpdateNewChannelMessageTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Message",
SchemaName: "message",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdateNewChannelMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNewChannelMessage#62ba04d9 as nil")
}
.PutID(UpdateNewChannelMessageTypeID)
return .EncodeBare()
}
func ( *UpdateNewChannelMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNewChannelMessage#62ba04d9 as nil")
}
if .Message == nil {
return fmt.Errorf("unable to encode updateNewChannelMessage#62ba04d9: field message is nil")
}
if := .Message.Encode(); != nil {
return fmt.Errorf("unable to encode updateNewChannelMessage#62ba04d9: field message: %w", )
}
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdateNewChannelMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNewChannelMessage#62ba04d9 to nil")
}
if := .ConsumeID(UpdateNewChannelMessageTypeID); != nil {
return fmt.Errorf("unable to decode updateNewChannelMessage#62ba04d9: %w", )
}
return .DecodeBare()
}
func ( *UpdateNewChannelMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNewChannelMessage#62ba04d9 to nil")
}
{
, := DecodeMessage()
if != nil {
return fmt.Errorf("unable to decode updateNewChannelMessage#62ba04d9: field message: %w", )
}
.Message =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateNewChannelMessage#62ba04d9: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateNewChannelMessage#62ba04d9: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdateNewChannelMessage) () ( MessageClass) {
if == nil {
return
}
return .Message
}
func ( *UpdateNewChannelMessage) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdateNewChannelMessage) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdateReadChannelInbox struct {
Flags bin.Fields
FolderID int
ChannelID int64
MaxID int
StillUnreadCount int
Pts int
}
const UpdateReadChannelInboxTypeID = 0x922e6e10
func ( UpdateReadChannelInbox) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateReadChannelInbox{}
_ bin.Decoder = &UpdateReadChannelInbox{}
_ bin.BareEncoder = &UpdateReadChannelInbox{}
_ bin.BareDecoder = &UpdateReadChannelInbox{}
_ UpdateClass = &UpdateReadChannelInbox{}
)
func ( *UpdateReadChannelInbox) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.FolderID == 0) {
return false
}
if !(.ChannelID == 0) {
return false
}
if !(.MaxID == 0) {
return false
}
if !(.StillUnreadCount == 0) {
return false
}
if !(.Pts == 0) {
return false
}
return true
}
func ( *UpdateReadChannelInbox) () string {
if == nil {
return "UpdateReadChannelInbox(nil)"
}
type UpdateReadChannelInbox
return fmt.Sprintf("UpdateReadChannelInbox%+v", (*))
}
func ( *UpdateReadChannelInbox) ( interface {
() ( int, bool)
() ( int64)
() ( int)
() ( int)
() ( int)
}) {
if , := .(); {
.FolderID =
}
.ChannelID = .()
.MaxID = .()
.StillUnreadCount = .()
.Pts = .()
}
func (*UpdateReadChannelInbox) () uint32 {
return UpdateReadChannelInboxTypeID
}
func (*UpdateReadChannelInbox) () string {
return "updateReadChannelInbox"
}
func ( *UpdateReadChannelInbox) () tdp.Type {
:= tdp.Type{
Name: "updateReadChannelInbox",
ID: UpdateReadChannelInboxTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "FolderID",
SchemaName: "folder_id",
Null: !.Flags.Has(0),
},
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "MaxID",
SchemaName: "max_id",
},
{
Name: "StillUnreadCount",
SchemaName: "still_unread_count",
},
{
Name: "Pts",
SchemaName: "pts",
},
}
return
}
func ( *UpdateReadChannelInbox) () {
if !(.FolderID == 0) {
.Flags.Set(0)
}
}
func ( *UpdateReadChannelInbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadChannelInbox#922e6e10 as nil")
}
.PutID(UpdateReadChannelInboxTypeID)
return .EncodeBare()
}
func ( *UpdateReadChannelInbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadChannelInbox#922e6e10 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateReadChannelInbox#922e6e10: field flags: %w", )
}
if .Flags.Has(0) {
.PutInt(.FolderID)
}
.PutLong(.ChannelID)
.PutInt(.MaxID)
.PutInt(.StillUnreadCount)
.PutInt(.Pts)
return nil
}
func ( *UpdateReadChannelInbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadChannelInbox#922e6e10 to nil")
}
if := .ConsumeID(UpdateReadChannelInboxTypeID); != nil {
return fmt.Errorf("unable to decode updateReadChannelInbox#922e6e10: %w", )
}
return .DecodeBare()
}
func ( *UpdateReadChannelInbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadChannelInbox#922e6e10 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateReadChannelInbox#922e6e10: field flags: %w", )
}
}
if .Flags.Has(0) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelInbox#922e6e10: field folder_id: %w", )
}
.FolderID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelInbox#922e6e10: field channel_id: %w", )
}
.ChannelID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelInbox#922e6e10: field max_id: %w", )
}
.MaxID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelInbox#922e6e10: field still_unread_count: %w", )
}
.StillUnreadCount =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelInbox#922e6e10: field pts: %w", )
}
.Pts =
}
return nil
}
func ( *UpdateReadChannelInbox) ( int) {
.Flags.Set(0)
.FolderID =
}
func ( *UpdateReadChannelInbox) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .FolderID, true
}
func ( *UpdateReadChannelInbox) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateReadChannelInbox) () ( int) {
if == nil {
return
}
return .MaxID
}
func ( *UpdateReadChannelInbox) () ( int) {
if == nil {
return
}
return .StillUnreadCount
}
func ( *UpdateReadChannelInbox) () ( int) {
if == nil {
return
}
return .Pts
}
type UpdateDeleteChannelMessages struct {
ChannelID int64
Messages []int
Pts int
PtsCount int
}
const UpdateDeleteChannelMessagesTypeID = 0xc32d5b12
func ( UpdateDeleteChannelMessages) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateDeleteChannelMessages{}
_ bin.Decoder = &UpdateDeleteChannelMessages{}
_ bin.BareEncoder = &UpdateDeleteChannelMessages{}
_ bin.BareDecoder = &UpdateDeleteChannelMessages{}
_ UpdateClass = &UpdateDeleteChannelMessages{}
)
func ( *UpdateDeleteChannelMessages) () bool {
if == nil {
return true
}
if !(.ChannelID == 0) {
return false
}
if !(.Messages == nil) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdateDeleteChannelMessages) () string {
if == nil {
return "UpdateDeleteChannelMessages(nil)"
}
type UpdateDeleteChannelMessages
return fmt.Sprintf("UpdateDeleteChannelMessages%+v", (*))
}
func ( *UpdateDeleteChannelMessages) ( interface {
() ( int64)
() ( []int)
() ( int)
() ( int)
}) {
.ChannelID = .()
.Messages = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdateDeleteChannelMessages) () uint32 {
return UpdateDeleteChannelMessagesTypeID
}
func (*UpdateDeleteChannelMessages) () string {
return "updateDeleteChannelMessages"
}
func ( *UpdateDeleteChannelMessages) () tdp.Type {
:= tdp.Type{
Name: "updateDeleteChannelMessages",
ID: UpdateDeleteChannelMessagesTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "Messages",
SchemaName: "messages",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdateDeleteChannelMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDeleteChannelMessages#c32d5b12 as nil")
}
.PutID(UpdateDeleteChannelMessagesTypeID)
return .EncodeBare()
}
func ( *UpdateDeleteChannelMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDeleteChannelMessages#c32d5b12 as nil")
}
.PutLong(.ChannelID)
.PutVectorHeader(len(.Messages))
for , := range .Messages {
.PutInt()
}
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdateDeleteChannelMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDeleteChannelMessages#c32d5b12 to nil")
}
if := .ConsumeID(UpdateDeleteChannelMessagesTypeID); != nil {
return fmt.Errorf("unable to decode updateDeleteChannelMessages#c32d5b12: %w", )
}
return .DecodeBare()
}
func ( *UpdateDeleteChannelMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDeleteChannelMessages#c32d5b12 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateDeleteChannelMessages#c32d5b12: field channel_id: %w", )
}
.ChannelID =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateDeleteChannelMessages#c32d5b12: field messages: %w", )
}
if > 0 {
.Messages = make([]int, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateDeleteChannelMessages#c32d5b12: field messages: %w", )
}
.Messages = append(.Messages, )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateDeleteChannelMessages#c32d5b12: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateDeleteChannelMessages#c32d5b12: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdateDeleteChannelMessages) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateDeleteChannelMessages) () ( []int) {
if == nil {
return
}
return .Messages
}
func ( *UpdateDeleteChannelMessages) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdateDeleteChannelMessages) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdateChannelMessageViews struct {
ChannelID int64
ID int
Views int
}
const UpdateChannelMessageViewsTypeID = 0xf226ac08
func ( UpdateChannelMessageViews) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChannelMessageViews{}
_ bin.Decoder = &UpdateChannelMessageViews{}
_ bin.BareEncoder = &UpdateChannelMessageViews{}
_ bin.BareDecoder = &UpdateChannelMessageViews{}
_ UpdateClass = &UpdateChannelMessageViews{}
)
func ( *UpdateChannelMessageViews) () bool {
if == nil {
return true
}
if !(.ChannelID == 0) {
return false
}
if !(.ID == 0) {
return false
}
if !(.Views == 0) {
return false
}
return true
}
func ( *UpdateChannelMessageViews) () string {
if == nil {
return "UpdateChannelMessageViews(nil)"
}
type UpdateChannelMessageViews
return fmt.Sprintf("UpdateChannelMessageViews%+v", (*))
}
func ( *UpdateChannelMessageViews) ( interface {
() ( int64)
() ( int)
() ( int)
}) {
.ChannelID = .()
.ID = .()
.Views = .()
}
func (*UpdateChannelMessageViews) () uint32 {
return UpdateChannelMessageViewsTypeID
}
func (*UpdateChannelMessageViews) () string {
return "updateChannelMessageViews"
}
func ( *UpdateChannelMessageViews) () tdp.Type {
:= tdp.Type{
Name: "updateChannelMessageViews",
ID: UpdateChannelMessageViewsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "ID",
SchemaName: "id",
},
{
Name: "Views",
SchemaName: "views",
},
}
return
}
func ( *UpdateChannelMessageViews) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelMessageViews#f226ac08 as nil")
}
.PutID(UpdateChannelMessageViewsTypeID)
return .EncodeBare()
}
func ( *UpdateChannelMessageViews) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelMessageViews#f226ac08 as nil")
}
.PutLong(.ChannelID)
.PutInt(.ID)
.PutInt(.Views)
return nil
}
func ( *UpdateChannelMessageViews) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelMessageViews#f226ac08 to nil")
}
if := .ConsumeID(UpdateChannelMessageViewsTypeID); != nil {
return fmt.Errorf("unable to decode updateChannelMessageViews#f226ac08: %w", )
}
return .DecodeBare()
}
func ( *UpdateChannelMessageViews) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelMessageViews#f226ac08 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelMessageViews#f226ac08: field channel_id: %w", )
}
.ChannelID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelMessageViews#f226ac08: field id: %w", )
}
.ID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelMessageViews#f226ac08: field views: %w", )
}
.Views =
}
return nil
}
func ( *UpdateChannelMessageViews) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateChannelMessageViews) () ( int) {
if == nil {
return
}
return .ID
}
func ( *UpdateChannelMessageViews) () ( int) {
if == nil {
return
}
return .Views
}
type UpdateChatParticipantAdmin struct {
ChatID int64
UserID int64
IsAdmin bool
Version int
}
const UpdateChatParticipantAdminTypeID = 0xd7ca61a2
func ( UpdateChatParticipantAdmin) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChatParticipantAdmin{}
_ bin.Decoder = &UpdateChatParticipantAdmin{}
_ bin.BareEncoder = &UpdateChatParticipantAdmin{}
_ bin.BareDecoder = &UpdateChatParticipantAdmin{}
_ UpdateClass = &UpdateChatParticipantAdmin{}
)
func ( *UpdateChatParticipantAdmin) () bool {
if == nil {
return true
}
if !(.ChatID == 0) {
return false
}
if !(.UserID == 0) {
return false
}
if !(.IsAdmin == false) {
return false
}
if !(.Version == 0) {
return false
}
return true
}
func ( *UpdateChatParticipantAdmin) () string {
if == nil {
return "UpdateChatParticipantAdmin(nil)"
}
type UpdateChatParticipantAdmin
return fmt.Sprintf("UpdateChatParticipantAdmin%+v", (*))
}
func ( *UpdateChatParticipantAdmin) ( interface {
() ( int64)
() ( int64)
() ( bool)
() ( int)
}) {
.ChatID = .()
.UserID = .()
.IsAdmin = .()
.Version = .()
}
func (*UpdateChatParticipantAdmin) () uint32 {
return UpdateChatParticipantAdminTypeID
}
func (*UpdateChatParticipantAdmin) () string {
return "updateChatParticipantAdmin"
}
func ( *UpdateChatParticipantAdmin) () tdp.Type {
:= tdp.Type{
Name: "updateChatParticipantAdmin",
ID: UpdateChatParticipantAdminTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChatID",
SchemaName: "chat_id",
},
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "IsAdmin",
SchemaName: "is_admin",
},
{
Name: "Version",
SchemaName: "version",
},
}
return
}
func ( *UpdateChatParticipantAdmin) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatParticipantAdmin#d7ca61a2 as nil")
}
.PutID(UpdateChatParticipantAdminTypeID)
return .EncodeBare()
}
func ( *UpdateChatParticipantAdmin) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatParticipantAdmin#d7ca61a2 as nil")
}
.PutLong(.ChatID)
.PutLong(.UserID)
.PutBool(.IsAdmin)
.PutInt(.Version)
return nil
}
func ( *UpdateChatParticipantAdmin) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatParticipantAdmin#d7ca61a2 to nil")
}
if := .ConsumeID(UpdateChatParticipantAdminTypeID); != nil {
return fmt.Errorf("unable to decode updateChatParticipantAdmin#d7ca61a2: %w", )
}
return .DecodeBare()
}
func ( *UpdateChatParticipantAdmin) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatParticipantAdmin#d7ca61a2 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipantAdmin#d7ca61a2: field chat_id: %w", )
}
.ChatID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipantAdmin#d7ca61a2: field user_id: %w", )
}
.UserID =
}
{
, := .Bool()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipantAdmin#d7ca61a2: field is_admin: %w", )
}
.IsAdmin =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipantAdmin#d7ca61a2: field version: %w", )
}
.Version =
}
return nil
}
func ( *UpdateChatParticipantAdmin) () ( int64) {
if == nil {
return
}
return .ChatID
}
func ( *UpdateChatParticipantAdmin) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateChatParticipantAdmin) () ( bool) {
if == nil {
return
}
return .IsAdmin
}
func ( *UpdateChatParticipantAdmin) () ( int) {
if == nil {
return
}
return .Version
}
type UpdateNewStickerSet struct {
Stickerset MessagesStickerSetClass
}
const UpdateNewStickerSetTypeID = 0x688a30aa
func ( UpdateNewStickerSet) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateNewStickerSet{}
_ bin.Decoder = &UpdateNewStickerSet{}
_ bin.BareEncoder = &UpdateNewStickerSet{}
_ bin.BareDecoder = &UpdateNewStickerSet{}
_ UpdateClass = &UpdateNewStickerSet{}
)
func ( *UpdateNewStickerSet) () bool {
if == nil {
return true
}
if !(.Stickerset == nil) {
return false
}
return true
}
func ( *UpdateNewStickerSet) () string {
if == nil {
return "UpdateNewStickerSet(nil)"
}
type UpdateNewStickerSet
return fmt.Sprintf("UpdateNewStickerSet%+v", (*))
}
func ( *UpdateNewStickerSet) ( interface {
() ( MessagesStickerSetClass)
}) {
.Stickerset = .()
}
func (*UpdateNewStickerSet) () uint32 {
return UpdateNewStickerSetTypeID
}
func (*UpdateNewStickerSet) () string {
return "updateNewStickerSet"
}
func ( *UpdateNewStickerSet) () tdp.Type {
:= tdp.Type{
Name: "updateNewStickerSet",
ID: UpdateNewStickerSetTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Stickerset",
SchemaName: "stickerset",
},
}
return
}
func ( *UpdateNewStickerSet) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNewStickerSet#688a30aa as nil")
}
.PutID(UpdateNewStickerSetTypeID)
return .EncodeBare()
}
func ( *UpdateNewStickerSet) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNewStickerSet#688a30aa as nil")
}
if .Stickerset == nil {
return fmt.Errorf("unable to encode updateNewStickerSet#688a30aa: field stickerset is nil")
}
if := .Stickerset.Encode(); != nil {
return fmt.Errorf("unable to encode updateNewStickerSet#688a30aa: field stickerset: %w", )
}
return nil
}
func ( *UpdateNewStickerSet) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNewStickerSet#688a30aa to nil")
}
if := .ConsumeID(UpdateNewStickerSetTypeID); != nil {
return fmt.Errorf("unable to decode updateNewStickerSet#688a30aa: %w", )
}
return .DecodeBare()
}
func ( *UpdateNewStickerSet) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNewStickerSet#688a30aa to nil")
}
{
, := DecodeMessagesStickerSet()
if != nil {
return fmt.Errorf("unable to decode updateNewStickerSet#688a30aa: field stickerset: %w", )
}
.Stickerset =
}
return nil
}
func ( *UpdateNewStickerSet) () ( MessagesStickerSetClass) {
if == nil {
return
}
return .Stickerset
}
type UpdateStickerSetsOrder struct {
Flags bin.Fields
Masks bool
Emojis bool
Order []int64
}
const UpdateStickerSetsOrderTypeID = 0xbb2d201
func ( UpdateStickerSetsOrder) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateStickerSetsOrder{}
_ bin.Decoder = &UpdateStickerSetsOrder{}
_ bin.BareEncoder = &UpdateStickerSetsOrder{}
_ bin.BareDecoder = &UpdateStickerSetsOrder{}
_ UpdateClass = &UpdateStickerSetsOrder{}
)
func ( *UpdateStickerSetsOrder) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Masks == false) {
return false
}
if !(.Emojis == false) {
return false
}
if !(.Order == nil) {
return false
}
return true
}
func ( *UpdateStickerSetsOrder) () string {
if == nil {
return "UpdateStickerSetsOrder(nil)"
}
type UpdateStickerSetsOrder
return fmt.Sprintf("UpdateStickerSetsOrder%+v", (*))
}
func ( *UpdateStickerSetsOrder) ( interface {
() ( bool)
() ( bool)
() ( []int64)
}) {
.Masks = .()
.Emojis = .()
.Order = .()
}
func (*UpdateStickerSetsOrder) () uint32 {
return UpdateStickerSetsOrderTypeID
}
func (*UpdateStickerSetsOrder) () string {
return "updateStickerSetsOrder"
}
func ( *UpdateStickerSetsOrder) () tdp.Type {
:= tdp.Type{
Name: "updateStickerSetsOrder",
ID: UpdateStickerSetsOrderTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Masks",
SchemaName: "masks",
Null: !.Flags.Has(0),
},
{
Name: "Emojis",
SchemaName: "emojis",
Null: !.Flags.Has(1),
},
{
Name: "Order",
SchemaName: "order",
},
}
return
}
func ( *UpdateStickerSetsOrder) () {
if !(.Masks == false) {
.Flags.Set(0)
}
if !(.Emojis == false) {
.Flags.Set(1)
}
}
func ( *UpdateStickerSetsOrder) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateStickerSetsOrder#bb2d201 as nil")
}
.PutID(UpdateStickerSetsOrderTypeID)
return .EncodeBare()
}
func ( *UpdateStickerSetsOrder) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateStickerSetsOrder#bb2d201 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateStickerSetsOrder#bb2d201: field flags: %w", )
}
.PutVectorHeader(len(.Order))
for , := range .Order {
.PutLong()
}
return nil
}
func ( *UpdateStickerSetsOrder) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateStickerSetsOrder#bb2d201 to nil")
}
if := .ConsumeID(UpdateStickerSetsOrderTypeID); != nil {
return fmt.Errorf("unable to decode updateStickerSetsOrder#bb2d201: %w", )
}
return .DecodeBare()
}
func ( *UpdateStickerSetsOrder) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateStickerSetsOrder#bb2d201 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateStickerSetsOrder#bb2d201: field flags: %w", )
}
}
.Masks = .Flags.Has(0)
.Emojis = .Flags.Has(1)
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateStickerSetsOrder#bb2d201: field order: %w", )
}
if > 0 {
.Order = make([]int64, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateStickerSetsOrder#bb2d201: field order: %w", )
}
.Order = append(.Order, )
}
}
return nil
}
func ( *UpdateStickerSetsOrder) ( bool) {
if {
.Flags.Set(0)
.Masks = true
} else {
.Flags.Unset(0)
.Masks = false
}
}
func ( *UpdateStickerSetsOrder) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdateStickerSetsOrder) ( bool) {
if {
.Flags.Set(1)
.Emojis = true
} else {
.Flags.Unset(1)
.Emojis = false
}
}
func ( *UpdateStickerSetsOrder) () ( bool) {
if == nil {
return
}
return .Flags.Has(1)
}
func ( *UpdateStickerSetsOrder) () ( []int64) {
if == nil {
return
}
return .Order
}
type UpdateStickerSets struct {
Flags bin.Fields
Masks bool
Emojis bool
}
const UpdateStickerSetsTypeID = 0x31c24808
func ( UpdateStickerSets) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateStickerSets{}
_ bin.Decoder = &UpdateStickerSets{}
_ bin.BareEncoder = &UpdateStickerSets{}
_ bin.BareDecoder = &UpdateStickerSets{}
_ UpdateClass = &UpdateStickerSets{}
)
func ( *UpdateStickerSets) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Masks == false) {
return false
}
if !(.Emojis == false) {
return false
}
return true
}
func ( *UpdateStickerSets) () string {
if == nil {
return "UpdateStickerSets(nil)"
}
type UpdateStickerSets
return fmt.Sprintf("UpdateStickerSets%+v", (*))
}
func ( *UpdateStickerSets) ( interface {
() ( bool)
() ( bool)
}) {
.Masks = .()
.Emojis = .()
}
func (*UpdateStickerSets) () uint32 {
return UpdateStickerSetsTypeID
}
func (*UpdateStickerSets) () string {
return "updateStickerSets"
}
func ( *UpdateStickerSets) () tdp.Type {
:= tdp.Type{
Name: "updateStickerSets",
ID: UpdateStickerSetsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Masks",
SchemaName: "masks",
Null: !.Flags.Has(0),
},
{
Name: "Emojis",
SchemaName: "emojis",
Null: !.Flags.Has(1),
},
}
return
}
func ( *UpdateStickerSets) () {
if !(.Masks == false) {
.Flags.Set(0)
}
if !(.Emojis == false) {
.Flags.Set(1)
}
}
func ( *UpdateStickerSets) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateStickerSets#31c24808 as nil")
}
.PutID(UpdateStickerSetsTypeID)
return .EncodeBare()
}
func ( *UpdateStickerSets) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateStickerSets#31c24808 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateStickerSets#31c24808: field flags: %w", )
}
return nil
}
func ( *UpdateStickerSets) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateStickerSets#31c24808 to nil")
}
if := .ConsumeID(UpdateStickerSetsTypeID); != nil {
return fmt.Errorf("unable to decode updateStickerSets#31c24808: %w", )
}
return .DecodeBare()
}
func ( *UpdateStickerSets) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateStickerSets#31c24808 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateStickerSets#31c24808: field flags: %w", )
}
}
.Masks = .Flags.Has(0)
.Emojis = .Flags.Has(1)
return nil
}
func ( *UpdateStickerSets) ( bool) {
if {
.Flags.Set(0)
.Masks = true
} else {
.Flags.Unset(0)
.Masks = false
}
}
func ( *UpdateStickerSets) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdateStickerSets) ( bool) {
if {
.Flags.Set(1)
.Emojis = true
} else {
.Flags.Unset(1)
.Emojis = false
}
}
func ( *UpdateStickerSets) () ( bool) {
if == nil {
return
}
return .Flags.Has(1)
}
type UpdateSavedGifs struct {
}
const UpdateSavedGifsTypeID = 0x9375341e
func ( UpdateSavedGifs) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateSavedGifs{}
_ bin.Decoder = &UpdateSavedGifs{}
_ bin.BareEncoder = &UpdateSavedGifs{}
_ bin.BareDecoder = &UpdateSavedGifs{}
_ UpdateClass = &UpdateSavedGifs{}
)
func ( *UpdateSavedGifs) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateSavedGifs) () string {
if == nil {
return "UpdateSavedGifs(nil)"
}
type UpdateSavedGifs
return fmt.Sprintf("UpdateSavedGifs%+v", (*))
}
func (*UpdateSavedGifs) () uint32 {
return UpdateSavedGifsTypeID
}
func (*UpdateSavedGifs) () string {
return "updateSavedGifs"
}
func ( *UpdateSavedGifs) () tdp.Type {
:= tdp.Type{
Name: "updateSavedGifs",
ID: UpdateSavedGifsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateSavedGifs) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateSavedGifs#9375341e as nil")
}
.PutID(UpdateSavedGifsTypeID)
return .EncodeBare()
}
func ( *UpdateSavedGifs) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateSavedGifs#9375341e as nil")
}
return nil
}
func ( *UpdateSavedGifs) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateSavedGifs#9375341e to nil")
}
if := .ConsumeID(UpdateSavedGifsTypeID); != nil {
return fmt.Errorf("unable to decode updateSavedGifs#9375341e: %w", )
}
return .DecodeBare()
}
func ( *UpdateSavedGifs) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateSavedGifs#9375341e to nil")
}
return nil
}
type UpdateBotInlineQuery struct {
Flags bin.Fields
QueryID int64
UserID int64
Query string
Geo GeoPointClass
PeerType InlineQueryPeerTypeClass
Offset string
}
const UpdateBotInlineQueryTypeID = 0x496f379c
func ( UpdateBotInlineQuery) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotInlineQuery{}
_ bin.Decoder = &UpdateBotInlineQuery{}
_ bin.BareEncoder = &UpdateBotInlineQuery{}
_ bin.BareDecoder = &UpdateBotInlineQuery{}
_ UpdateClass = &UpdateBotInlineQuery{}
)
func ( *UpdateBotInlineQuery) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.QueryID == 0) {
return false
}
if !(.UserID == 0) {
return false
}
if !(.Query == "") {
return false
}
if !(.Geo == nil) {
return false
}
if !(.PeerType == nil) {
return false
}
if !(.Offset == "") {
return false
}
return true
}
func ( *UpdateBotInlineQuery) () string {
if == nil {
return "UpdateBotInlineQuery(nil)"
}
type UpdateBotInlineQuery
return fmt.Sprintf("UpdateBotInlineQuery%+v", (*))
}
func ( *UpdateBotInlineQuery) ( interface {
() ( int64)
() ( int64)
() ( string)
() ( GeoPointClass, bool)
() ( InlineQueryPeerTypeClass, bool)
() ( string)
}) {
.QueryID = .()
.UserID = .()
.Query = .()
if , := .(); {
.Geo =
}
if , := .(); {
.PeerType =
}
.Offset = .()
}
func (*UpdateBotInlineQuery) () uint32 {
return UpdateBotInlineQueryTypeID
}
func (*UpdateBotInlineQuery) () string {
return "updateBotInlineQuery"
}
func ( *UpdateBotInlineQuery) () tdp.Type {
:= tdp.Type{
Name: "updateBotInlineQuery",
ID: UpdateBotInlineQueryTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "QueryID",
SchemaName: "query_id",
},
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "Query",
SchemaName: "query",
},
{
Name: "Geo",
SchemaName: "geo",
Null: !.Flags.Has(0),
},
{
Name: "PeerType",
SchemaName: "peer_type",
Null: !.Flags.Has(1),
},
{
Name: "Offset",
SchemaName: "offset",
},
}
return
}
func ( *UpdateBotInlineQuery) () {
if !(.Geo == nil) {
.Flags.Set(0)
}
if !(.PeerType == nil) {
.Flags.Set(1)
}
}
func ( *UpdateBotInlineQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotInlineQuery#496f379c as nil")
}
.PutID(UpdateBotInlineQueryTypeID)
return .EncodeBare()
}
func ( *UpdateBotInlineQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotInlineQuery#496f379c as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotInlineQuery#496f379c: field flags: %w", )
}
.PutLong(.QueryID)
.PutLong(.UserID)
.PutString(.Query)
if .Flags.Has(0) {
if .Geo == nil {
return fmt.Errorf("unable to encode updateBotInlineQuery#496f379c: field geo is nil")
}
if := .Geo.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotInlineQuery#496f379c: field geo: %w", )
}
}
if .Flags.Has(1) {
if .PeerType == nil {
return fmt.Errorf("unable to encode updateBotInlineQuery#496f379c: field peer_type is nil")
}
if := .PeerType.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotInlineQuery#496f379c: field peer_type: %w", )
}
}
.PutString(.Offset)
return nil
}
func ( *UpdateBotInlineQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotInlineQuery#496f379c to nil")
}
if := .ConsumeID(UpdateBotInlineQueryTypeID); != nil {
return fmt.Errorf("unable to decode updateBotInlineQuery#496f379c: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotInlineQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotInlineQuery#496f379c to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateBotInlineQuery#496f379c: field flags: %w", )
}
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotInlineQuery#496f379c: field query_id: %w", )
}
.QueryID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotInlineQuery#496f379c: field user_id: %w", )
}
.UserID =
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateBotInlineQuery#496f379c: field query: %w", )
}
.Query =
}
if .Flags.Has(0) {
, := DecodeGeoPoint()
if != nil {
return fmt.Errorf("unable to decode updateBotInlineQuery#496f379c: field geo: %w", )
}
.Geo =
}
if .Flags.Has(1) {
, := DecodeInlineQueryPeerType()
if != nil {
return fmt.Errorf("unable to decode updateBotInlineQuery#496f379c: field peer_type: %w", )
}
.PeerType =
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateBotInlineQuery#496f379c: field offset: %w", )
}
.Offset =
}
return nil
}
func ( *UpdateBotInlineQuery) () ( int64) {
if == nil {
return
}
return .QueryID
}
func ( *UpdateBotInlineQuery) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateBotInlineQuery) () ( string) {
if == nil {
return
}
return .Query
}
func ( *UpdateBotInlineQuery) ( GeoPointClass) {
.Flags.Set(0)
.Geo =
}
func ( *UpdateBotInlineQuery) () ( GeoPointClass, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Geo, true
}
func ( *UpdateBotInlineQuery) ( InlineQueryPeerTypeClass) {
.Flags.Set(1)
.PeerType =
}
func ( *UpdateBotInlineQuery) () ( InlineQueryPeerTypeClass, bool) {
if == nil {
return
}
if !.Flags.Has(1) {
return , false
}
return .PeerType, true
}
func ( *UpdateBotInlineQuery) () ( string) {
if == nil {
return
}
return .Offset
}
type UpdateBotInlineSend struct {
Flags bin.Fields
UserID int64
Query string
Geo GeoPointClass
ID string
MsgID InputBotInlineMessageIDClass
}
const UpdateBotInlineSendTypeID = 0x12f12a07
func ( UpdateBotInlineSend) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotInlineSend{}
_ bin.Decoder = &UpdateBotInlineSend{}
_ bin.BareEncoder = &UpdateBotInlineSend{}
_ bin.BareDecoder = &UpdateBotInlineSend{}
_ UpdateClass = &UpdateBotInlineSend{}
)
func ( *UpdateBotInlineSend) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.UserID == 0) {
return false
}
if !(.Query == "") {
return false
}
if !(.Geo == nil) {
return false
}
if !(.ID == "") {
return false
}
if !(.MsgID == nil) {
return false
}
return true
}
func ( *UpdateBotInlineSend) () string {
if == nil {
return "UpdateBotInlineSend(nil)"
}
type UpdateBotInlineSend
return fmt.Sprintf("UpdateBotInlineSend%+v", (*))
}
func ( *UpdateBotInlineSend) ( interface {
() ( int64)
() ( string)
() ( GeoPointClass, bool)
() ( string)
() ( InputBotInlineMessageIDClass, bool)
}) {
.UserID = .()
.Query = .()
if , := .(); {
.Geo =
}
.ID = .()
if , := .(); {
.MsgID =
}
}
func (*UpdateBotInlineSend) () uint32 {
return UpdateBotInlineSendTypeID
}
func (*UpdateBotInlineSend) () string {
return "updateBotInlineSend"
}
func ( *UpdateBotInlineSend) () tdp.Type {
:= tdp.Type{
Name: "updateBotInlineSend",
ID: UpdateBotInlineSendTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "Query",
SchemaName: "query",
},
{
Name: "Geo",
SchemaName: "geo",
Null: !.Flags.Has(0),
},
{
Name: "ID",
SchemaName: "id",
},
{
Name: "MsgID",
SchemaName: "msg_id",
Null: !.Flags.Has(1),
},
}
return
}
func ( *UpdateBotInlineSend) () {
if !(.Geo == nil) {
.Flags.Set(0)
}
if !(.MsgID == nil) {
.Flags.Set(1)
}
}
func ( *UpdateBotInlineSend) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotInlineSend#12f12a07 as nil")
}
.PutID(UpdateBotInlineSendTypeID)
return .EncodeBare()
}
func ( *UpdateBotInlineSend) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotInlineSend#12f12a07 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotInlineSend#12f12a07: field flags: %w", )
}
.PutLong(.UserID)
.PutString(.Query)
if .Flags.Has(0) {
if .Geo == nil {
return fmt.Errorf("unable to encode updateBotInlineSend#12f12a07: field geo is nil")
}
if := .Geo.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotInlineSend#12f12a07: field geo: %w", )
}
}
.PutString(.ID)
if .Flags.Has(1) {
if .MsgID == nil {
return fmt.Errorf("unable to encode updateBotInlineSend#12f12a07: field msg_id is nil")
}
if := .MsgID.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotInlineSend#12f12a07: field msg_id: %w", )
}
}
return nil
}
func ( *UpdateBotInlineSend) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotInlineSend#12f12a07 to nil")
}
if := .ConsumeID(UpdateBotInlineSendTypeID); != nil {
return fmt.Errorf("unable to decode updateBotInlineSend#12f12a07: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotInlineSend) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotInlineSend#12f12a07 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateBotInlineSend#12f12a07: field flags: %w", )
}
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotInlineSend#12f12a07: field user_id: %w", )
}
.UserID =
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateBotInlineSend#12f12a07: field query: %w", )
}
.Query =
}
if .Flags.Has(0) {
, := DecodeGeoPoint()
if != nil {
return fmt.Errorf("unable to decode updateBotInlineSend#12f12a07: field geo: %w", )
}
.Geo =
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateBotInlineSend#12f12a07: field id: %w", )
}
.ID =
}
if .Flags.Has(1) {
, := DecodeInputBotInlineMessageID()
if != nil {
return fmt.Errorf("unable to decode updateBotInlineSend#12f12a07: field msg_id: %w", )
}
.MsgID =
}
return nil
}
func ( *UpdateBotInlineSend) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateBotInlineSend) () ( string) {
if == nil {
return
}
return .Query
}
func ( *UpdateBotInlineSend) ( GeoPointClass) {
.Flags.Set(0)
.Geo =
}
func ( *UpdateBotInlineSend) () ( GeoPointClass, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Geo, true
}
func ( *UpdateBotInlineSend) () ( string) {
if == nil {
return
}
return .ID
}
func ( *UpdateBotInlineSend) ( InputBotInlineMessageIDClass) {
.Flags.Set(1)
.MsgID =
}
func ( *UpdateBotInlineSend) () ( InputBotInlineMessageIDClass, bool) {
if == nil {
return
}
if !.Flags.Has(1) {
return , false
}
return .MsgID, true
}
type UpdateEditChannelMessage struct {
Message MessageClass
Pts int
PtsCount int
}
const UpdateEditChannelMessageTypeID = 0x1b3f4df7
func ( UpdateEditChannelMessage) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateEditChannelMessage{}
_ bin.Decoder = &UpdateEditChannelMessage{}
_ bin.BareEncoder = &UpdateEditChannelMessage{}
_ bin.BareDecoder = &UpdateEditChannelMessage{}
_ UpdateClass = &UpdateEditChannelMessage{}
)
func ( *UpdateEditChannelMessage) () bool {
if == nil {
return true
}
if !(.Message == nil) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdateEditChannelMessage) () string {
if == nil {
return "UpdateEditChannelMessage(nil)"
}
type UpdateEditChannelMessage
return fmt.Sprintf("UpdateEditChannelMessage%+v", (*))
}
func ( *UpdateEditChannelMessage) ( interface {
() ( MessageClass)
() ( int)
() ( int)
}) {
.Message = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdateEditChannelMessage) () uint32 {
return UpdateEditChannelMessageTypeID
}
func (*UpdateEditChannelMessage) () string {
return "updateEditChannelMessage"
}
func ( *UpdateEditChannelMessage) () tdp.Type {
:= tdp.Type{
Name: "updateEditChannelMessage",
ID: UpdateEditChannelMessageTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Message",
SchemaName: "message",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdateEditChannelMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateEditChannelMessage#1b3f4df7 as nil")
}
.PutID(UpdateEditChannelMessageTypeID)
return .EncodeBare()
}
func ( *UpdateEditChannelMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateEditChannelMessage#1b3f4df7 as nil")
}
if .Message == nil {
return fmt.Errorf("unable to encode updateEditChannelMessage#1b3f4df7: field message is nil")
}
if := .Message.Encode(); != nil {
return fmt.Errorf("unable to encode updateEditChannelMessage#1b3f4df7: field message: %w", )
}
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdateEditChannelMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateEditChannelMessage#1b3f4df7 to nil")
}
if := .ConsumeID(UpdateEditChannelMessageTypeID); != nil {
return fmt.Errorf("unable to decode updateEditChannelMessage#1b3f4df7: %w", )
}
return .DecodeBare()
}
func ( *UpdateEditChannelMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateEditChannelMessage#1b3f4df7 to nil")
}
{
, := DecodeMessage()
if != nil {
return fmt.Errorf("unable to decode updateEditChannelMessage#1b3f4df7: field message: %w", )
}
.Message =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateEditChannelMessage#1b3f4df7: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateEditChannelMessage#1b3f4df7: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdateEditChannelMessage) () ( MessageClass) {
if == nil {
return
}
return .Message
}
func ( *UpdateEditChannelMessage) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdateEditChannelMessage) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdateBotCallbackQuery struct {
Flags bin.Fields
QueryID int64
UserID int64
Peer PeerClass
MsgID int
ChatInstance int64
Data []byte
GameShortName string
}
const UpdateBotCallbackQueryTypeID = 0xb9cfc48d
func ( UpdateBotCallbackQuery) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotCallbackQuery{}
_ bin.Decoder = &UpdateBotCallbackQuery{}
_ bin.BareEncoder = &UpdateBotCallbackQuery{}
_ bin.BareDecoder = &UpdateBotCallbackQuery{}
_ UpdateClass = &UpdateBotCallbackQuery{}
)
func ( *UpdateBotCallbackQuery) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.QueryID == 0) {
return false
}
if !(.UserID == 0) {
return false
}
if !(.Peer == nil) {
return false
}
if !(.MsgID == 0) {
return false
}
if !(.ChatInstance == 0) {
return false
}
if !(.Data == nil) {
return false
}
if !(.GameShortName == "") {
return false
}
return true
}
func ( *UpdateBotCallbackQuery) () string {
if == nil {
return "UpdateBotCallbackQuery(nil)"
}
type UpdateBotCallbackQuery
return fmt.Sprintf("UpdateBotCallbackQuery%+v", (*))
}
func ( *UpdateBotCallbackQuery) ( interface {
() ( int64)
() ( int64)
() ( PeerClass)
() ( int)
() ( int64)
() ( []byte, bool)
() ( string, bool)
}) {
.QueryID = .()
.UserID = .()
.Peer = .()
.MsgID = .()
.ChatInstance = .()
if , := .(); {
.Data =
}
if , := .(); {
.GameShortName =
}
}
func (*UpdateBotCallbackQuery) () uint32 {
return UpdateBotCallbackQueryTypeID
}
func (*UpdateBotCallbackQuery) () string {
return "updateBotCallbackQuery"
}
func ( *UpdateBotCallbackQuery) () tdp.Type {
:= tdp.Type{
Name: "updateBotCallbackQuery",
ID: UpdateBotCallbackQueryTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "QueryID",
SchemaName: "query_id",
},
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "MsgID",
SchemaName: "msg_id",
},
{
Name: "ChatInstance",
SchemaName: "chat_instance",
},
{
Name: "Data",
SchemaName: "data",
Null: !.Flags.Has(0),
},
{
Name: "GameShortName",
SchemaName: "game_short_name",
Null: !.Flags.Has(1),
},
}
return
}
func ( *UpdateBotCallbackQuery) () {
if !(.Data == nil) {
.Flags.Set(0)
}
if !(.GameShortName == "") {
.Flags.Set(1)
}
}
func ( *UpdateBotCallbackQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotCallbackQuery#b9cfc48d as nil")
}
.PutID(UpdateBotCallbackQueryTypeID)
return .EncodeBare()
}
func ( *UpdateBotCallbackQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotCallbackQuery#b9cfc48d as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotCallbackQuery#b9cfc48d: field flags: %w", )
}
.PutLong(.QueryID)
.PutLong(.UserID)
if .Peer == nil {
return fmt.Errorf("unable to encode updateBotCallbackQuery#b9cfc48d: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotCallbackQuery#b9cfc48d: field peer: %w", )
}
.PutInt(.MsgID)
.PutLong(.ChatInstance)
if .Flags.Has(0) {
.PutBytes(.Data)
}
if .Flags.Has(1) {
.PutString(.GameShortName)
}
return nil
}
func ( *UpdateBotCallbackQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotCallbackQuery#b9cfc48d to nil")
}
if := .ConsumeID(UpdateBotCallbackQueryTypeID); != nil {
return fmt.Errorf("unable to decode updateBotCallbackQuery#b9cfc48d: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotCallbackQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotCallbackQuery#b9cfc48d to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateBotCallbackQuery#b9cfc48d: field flags: %w", )
}
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotCallbackQuery#b9cfc48d: field query_id: %w", )
}
.QueryID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotCallbackQuery#b9cfc48d: field user_id: %w", )
}
.UserID =
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateBotCallbackQuery#b9cfc48d: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotCallbackQuery#b9cfc48d: field msg_id: %w", )
}
.MsgID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotCallbackQuery#b9cfc48d: field chat_instance: %w", )
}
.ChatInstance =
}
if .Flags.Has(0) {
, := .Bytes()
if != nil {
return fmt.Errorf("unable to decode updateBotCallbackQuery#b9cfc48d: field data: %w", )
}
.Data =
}
if .Flags.Has(1) {
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateBotCallbackQuery#b9cfc48d: field game_short_name: %w", )
}
.GameShortName =
}
return nil
}
func ( *UpdateBotCallbackQuery) () ( int64) {
if == nil {
return
}
return .QueryID
}
func ( *UpdateBotCallbackQuery) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateBotCallbackQuery) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateBotCallbackQuery) () ( int) {
if == nil {
return
}
return .MsgID
}
func ( *UpdateBotCallbackQuery) () ( int64) {
if == nil {
return
}
return .ChatInstance
}
func ( *UpdateBotCallbackQuery) ( []byte) {
.Flags.Set(0)
.Data =
}
func ( *UpdateBotCallbackQuery) () ( []byte, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Data, true
}
func ( *UpdateBotCallbackQuery) ( string) {
.Flags.Set(1)
.GameShortName =
}
func ( *UpdateBotCallbackQuery) () ( string, bool) {
if == nil {
return
}
if !.Flags.Has(1) {
return , false
}
return .GameShortName, true
}
type UpdateEditMessage struct {
Message MessageClass
Pts int
PtsCount int
}
const UpdateEditMessageTypeID = 0xe40370a3
func ( UpdateEditMessage) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateEditMessage{}
_ bin.Decoder = &UpdateEditMessage{}
_ bin.BareEncoder = &UpdateEditMessage{}
_ bin.BareDecoder = &UpdateEditMessage{}
_ UpdateClass = &UpdateEditMessage{}
)
func ( *UpdateEditMessage) () bool {
if == nil {
return true
}
if !(.Message == nil) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdateEditMessage) () string {
if == nil {
return "UpdateEditMessage(nil)"
}
type UpdateEditMessage
return fmt.Sprintf("UpdateEditMessage%+v", (*))
}
func ( *UpdateEditMessage) ( interface {
() ( MessageClass)
() ( int)
() ( int)
}) {
.Message = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdateEditMessage) () uint32 {
return UpdateEditMessageTypeID
}
func (*UpdateEditMessage) () string {
return "updateEditMessage"
}
func ( *UpdateEditMessage) () tdp.Type {
:= tdp.Type{
Name: "updateEditMessage",
ID: UpdateEditMessageTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Message",
SchemaName: "message",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdateEditMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateEditMessage#e40370a3 as nil")
}
.PutID(UpdateEditMessageTypeID)
return .EncodeBare()
}
func ( *UpdateEditMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateEditMessage#e40370a3 as nil")
}
if .Message == nil {
return fmt.Errorf("unable to encode updateEditMessage#e40370a3: field message is nil")
}
if := .Message.Encode(); != nil {
return fmt.Errorf("unable to encode updateEditMessage#e40370a3: field message: %w", )
}
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdateEditMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateEditMessage#e40370a3 to nil")
}
if := .ConsumeID(UpdateEditMessageTypeID); != nil {
return fmt.Errorf("unable to decode updateEditMessage#e40370a3: %w", )
}
return .DecodeBare()
}
func ( *UpdateEditMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateEditMessage#e40370a3 to nil")
}
{
, := DecodeMessage()
if != nil {
return fmt.Errorf("unable to decode updateEditMessage#e40370a3: field message: %w", )
}
.Message =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateEditMessage#e40370a3: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateEditMessage#e40370a3: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdateEditMessage) () ( MessageClass) {
if == nil {
return
}
return .Message
}
func ( *UpdateEditMessage) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdateEditMessage) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdateInlineBotCallbackQuery struct {
Flags bin.Fields
QueryID int64
UserID int64
MsgID InputBotInlineMessageIDClass
ChatInstance int64
Data []byte
GameShortName string
}
const UpdateInlineBotCallbackQueryTypeID = 0x691e9052
func ( UpdateInlineBotCallbackQuery) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateInlineBotCallbackQuery{}
_ bin.Decoder = &UpdateInlineBotCallbackQuery{}
_ bin.BareEncoder = &UpdateInlineBotCallbackQuery{}
_ bin.BareDecoder = &UpdateInlineBotCallbackQuery{}
_ UpdateClass = &UpdateInlineBotCallbackQuery{}
)
func ( *UpdateInlineBotCallbackQuery) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.QueryID == 0) {
return false
}
if !(.UserID == 0) {
return false
}
if !(.MsgID == nil) {
return false
}
if !(.ChatInstance == 0) {
return false
}
if !(.Data == nil) {
return false
}
if !(.GameShortName == "") {
return false
}
return true
}
func ( *UpdateInlineBotCallbackQuery) () string {
if == nil {
return "UpdateInlineBotCallbackQuery(nil)"
}
type UpdateInlineBotCallbackQuery
return fmt.Sprintf("UpdateInlineBotCallbackQuery%+v", (*))
}
func ( *UpdateInlineBotCallbackQuery) ( interface {
() ( int64)
() ( int64)
() ( InputBotInlineMessageIDClass)
() ( int64)
() ( []byte, bool)
() ( string, bool)
}) {
.QueryID = .()
.UserID = .()
.MsgID = .()
.ChatInstance = .()
if , := .(); {
.Data =
}
if , := .(); {
.GameShortName =
}
}
func (*UpdateInlineBotCallbackQuery) () uint32 {
return UpdateInlineBotCallbackQueryTypeID
}
func (*UpdateInlineBotCallbackQuery) () string {
return "updateInlineBotCallbackQuery"
}
func ( *UpdateInlineBotCallbackQuery) () tdp.Type {
:= tdp.Type{
Name: "updateInlineBotCallbackQuery",
ID: UpdateInlineBotCallbackQueryTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "QueryID",
SchemaName: "query_id",
},
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "MsgID",
SchemaName: "msg_id",
},
{
Name: "ChatInstance",
SchemaName: "chat_instance",
},
{
Name: "Data",
SchemaName: "data",
Null: !.Flags.Has(0),
},
{
Name: "GameShortName",
SchemaName: "game_short_name",
Null: !.Flags.Has(1),
},
}
return
}
func ( *UpdateInlineBotCallbackQuery) () {
if !(.Data == nil) {
.Flags.Set(0)
}
if !(.GameShortName == "") {
.Flags.Set(1)
}
}
func ( *UpdateInlineBotCallbackQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateInlineBotCallbackQuery#691e9052 as nil")
}
.PutID(UpdateInlineBotCallbackQueryTypeID)
return .EncodeBare()
}
func ( *UpdateInlineBotCallbackQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateInlineBotCallbackQuery#691e9052 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateInlineBotCallbackQuery#691e9052: field flags: %w", )
}
.PutLong(.QueryID)
.PutLong(.UserID)
if .MsgID == nil {
return fmt.Errorf("unable to encode updateInlineBotCallbackQuery#691e9052: field msg_id is nil")
}
if := .MsgID.Encode(); != nil {
return fmt.Errorf("unable to encode updateInlineBotCallbackQuery#691e9052: field msg_id: %w", )
}
.PutLong(.ChatInstance)
if .Flags.Has(0) {
.PutBytes(.Data)
}
if .Flags.Has(1) {
.PutString(.GameShortName)
}
return nil
}
func ( *UpdateInlineBotCallbackQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateInlineBotCallbackQuery#691e9052 to nil")
}
if := .ConsumeID(UpdateInlineBotCallbackQueryTypeID); != nil {
return fmt.Errorf("unable to decode updateInlineBotCallbackQuery#691e9052: %w", )
}
return .DecodeBare()
}
func ( *UpdateInlineBotCallbackQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateInlineBotCallbackQuery#691e9052 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateInlineBotCallbackQuery#691e9052: field flags: %w", )
}
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateInlineBotCallbackQuery#691e9052: field query_id: %w", )
}
.QueryID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateInlineBotCallbackQuery#691e9052: field user_id: %w", )
}
.UserID =
}
{
, := DecodeInputBotInlineMessageID()
if != nil {
return fmt.Errorf("unable to decode updateInlineBotCallbackQuery#691e9052: field msg_id: %w", )
}
.MsgID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateInlineBotCallbackQuery#691e9052: field chat_instance: %w", )
}
.ChatInstance =
}
if .Flags.Has(0) {
, := .Bytes()
if != nil {
return fmt.Errorf("unable to decode updateInlineBotCallbackQuery#691e9052: field data: %w", )
}
.Data =
}
if .Flags.Has(1) {
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateInlineBotCallbackQuery#691e9052: field game_short_name: %w", )
}
.GameShortName =
}
return nil
}
func ( *UpdateInlineBotCallbackQuery) () ( int64) {
if == nil {
return
}
return .QueryID
}
func ( *UpdateInlineBotCallbackQuery) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateInlineBotCallbackQuery) () ( InputBotInlineMessageIDClass) {
if == nil {
return
}
return .MsgID
}
func ( *UpdateInlineBotCallbackQuery) () ( int64) {
if == nil {
return
}
return .ChatInstance
}
func ( *UpdateInlineBotCallbackQuery) ( []byte) {
.Flags.Set(0)
.Data =
}
func ( *UpdateInlineBotCallbackQuery) () ( []byte, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Data, true
}
func ( *UpdateInlineBotCallbackQuery) ( string) {
.Flags.Set(1)
.GameShortName =
}
func ( *UpdateInlineBotCallbackQuery) () ( string, bool) {
if == nil {
return
}
if !.Flags.Has(1) {
return , false
}
return .GameShortName, true
}
type UpdateReadChannelOutbox struct {
ChannelID int64
MaxID int
}
const UpdateReadChannelOutboxTypeID = 0xb75f99a9
func ( UpdateReadChannelOutbox) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateReadChannelOutbox{}
_ bin.Decoder = &UpdateReadChannelOutbox{}
_ bin.BareEncoder = &UpdateReadChannelOutbox{}
_ bin.BareDecoder = &UpdateReadChannelOutbox{}
_ UpdateClass = &UpdateReadChannelOutbox{}
)
func ( *UpdateReadChannelOutbox) () bool {
if == nil {
return true
}
if !(.ChannelID == 0) {
return false
}
if !(.MaxID == 0) {
return false
}
return true
}
func ( *UpdateReadChannelOutbox) () string {
if == nil {
return "UpdateReadChannelOutbox(nil)"
}
type UpdateReadChannelOutbox
return fmt.Sprintf("UpdateReadChannelOutbox%+v", (*))
}
func ( *UpdateReadChannelOutbox) ( interface {
() ( int64)
() ( int)
}) {
.ChannelID = .()
.MaxID = .()
}
func (*UpdateReadChannelOutbox) () uint32 {
return UpdateReadChannelOutboxTypeID
}
func (*UpdateReadChannelOutbox) () string {
return "updateReadChannelOutbox"
}
func ( *UpdateReadChannelOutbox) () tdp.Type {
:= tdp.Type{
Name: "updateReadChannelOutbox",
ID: UpdateReadChannelOutboxTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "MaxID",
SchemaName: "max_id",
},
}
return
}
func ( *UpdateReadChannelOutbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadChannelOutbox#b75f99a9 as nil")
}
.PutID(UpdateReadChannelOutboxTypeID)
return .EncodeBare()
}
func ( *UpdateReadChannelOutbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadChannelOutbox#b75f99a9 as nil")
}
.PutLong(.ChannelID)
.PutInt(.MaxID)
return nil
}
func ( *UpdateReadChannelOutbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadChannelOutbox#b75f99a9 to nil")
}
if := .ConsumeID(UpdateReadChannelOutboxTypeID); != nil {
return fmt.Errorf("unable to decode updateReadChannelOutbox#b75f99a9: %w", )
}
return .DecodeBare()
}
func ( *UpdateReadChannelOutbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadChannelOutbox#b75f99a9 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelOutbox#b75f99a9: field channel_id: %w", )
}
.ChannelID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelOutbox#b75f99a9: field max_id: %w", )
}
.MaxID =
}
return nil
}
func ( *UpdateReadChannelOutbox) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateReadChannelOutbox) () ( int) {
if == nil {
return
}
return .MaxID
}
type UpdateDraftMessage struct {
Flags bin.Fields
Peer PeerClass
TopMsgID int
Draft DraftMessageClass
}
const UpdateDraftMessageTypeID = 0x1b49ec6d
func ( UpdateDraftMessage) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateDraftMessage{}
_ bin.Decoder = &UpdateDraftMessage{}
_ bin.BareEncoder = &UpdateDraftMessage{}
_ bin.BareDecoder = &UpdateDraftMessage{}
_ UpdateClass = &UpdateDraftMessage{}
)
func ( *UpdateDraftMessage) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Peer == nil) {
return false
}
if !(.TopMsgID == 0) {
return false
}
if !(.Draft == nil) {
return false
}
return true
}
func ( *UpdateDraftMessage) () string {
if == nil {
return "UpdateDraftMessage(nil)"
}
type UpdateDraftMessage
return fmt.Sprintf("UpdateDraftMessage%+v", (*))
}
func ( *UpdateDraftMessage) ( interface {
() ( PeerClass)
() ( int, bool)
() ( DraftMessageClass)
}) {
.Peer = .()
if , := .(); {
.TopMsgID =
}
.Draft = .()
}
func (*UpdateDraftMessage) () uint32 {
return UpdateDraftMessageTypeID
}
func (*UpdateDraftMessage) () string {
return "updateDraftMessage"
}
func ( *UpdateDraftMessage) () tdp.Type {
:= tdp.Type{
Name: "updateDraftMessage",
ID: UpdateDraftMessageTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "TopMsgID",
SchemaName: "top_msg_id",
Null: !.Flags.Has(0),
},
{
Name: "Draft",
SchemaName: "draft",
},
}
return
}
func ( *UpdateDraftMessage) () {
if !(.TopMsgID == 0) {
.Flags.Set(0)
}
}
func ( *UpdateDraftMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDraftMessage#1b49ec6d as nil")
}
.PutID(UpdateDraftMessageTypeID)
return .EncodeBare()
}
func ( *UpdateDraftMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDraftMessage#1b49ec6d as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateDraftMessage#1b49ec6d: field flags: %w", )
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateDraftMessage#1b49ec6d: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateDraftMessage#1b49ec6d: field peer: %w", )
}
if .Flags.Has(0) {
.PutInt(.TopMsgID)
}
if .Draft == nil {
return fmt.Errorf("unable to encode updateDraftMessage#1b49ec6d: field draft is nil")
}
if := .Draft.Encode(); != nil {
return fmt.Errorf("unable to encode updateDraftMessage#1b49ec6d: field draft: %w", )
}
return nil
}
func ( *UpdateDraftMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDraftMessage#1b49ec6d to nil")
}
if := .ConsumeID(UpdateDraftMessageTypeID); != nil {
return fmt.Errorf("unable to decode updateDraftMessage#1b49ec6d: %w", )
}
return .DecodeBare()
}
func ( *UpdateDraftMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDraftMessage#1b49ec6d to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateDraftMessage#1b49ec6d: field flags: %w", )
}
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateDraftMessage#1b49ec6d: field peer: %w", )
}
.Peer =
}
if .Flags.Has(0) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateDraftMessage#1b49ec6d: field top_msg_id: %w", )
}
.TopMsgID =
}
{
, := DecodeDraftMessage()
if != nil {
return fmt.Errorf("unable to decode updateDraftMessage#1b49ec6d: field draft: %w", )
}
.Draft =
}
return nil
}
func ( *UpdateDraftMessage) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateDraftMessage) ( int) {
.Flags.Set(0)
.TopMsgID =
}
func ( *UpdateDraftMessage) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .TopMsgID, true
}
func ( *UpdateDraftMessage) () ( DraftMessageClass) {
if == nil {
return
}
return .Draft
}
type UpdateReadFeaturedStickers struct {
}
const UpdateReadFeaturedStickersTypeID = 0x571d2742
func ( UpdateReadFeaturedStickers) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateReadFeaturedStickers{}
_ bin.Decoder = &UpdateReadFeaturedStickers{}
_ bin.BareEncoder = &UpdateReadFeaturedStickers{}
_ bin.BareDecoder = &UpdateReadFeaturedStickers{}
_ UpdateClass = &UpdateReadFeaturedStickers{}
)
func ( *UpdateReadFeaturedStickers) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateReadFeaturedStickers) () string {
if == nil {
return "UpdateReadFeaturedStickers(nil)"
}
type UpdateReadFeaturedStickers
return fmt.Sprintf("UpdateReadFeaturedStickers%+v", (*))
}
func (*UpdateReadFeaturedStickers) () uint32 {
return UpdateReadFeaturedStickersTypeID
}
func (*UpdateReadFeaturedStickers) () string {
return "updateReadFeaturedStickers"
}
func ( *UpdateReadFeaturedStickers) () tdp.Type {
:= tdp.Type{
Name: "updateReadFeaturedStickers",
ID: UpdateReadFeaturedStickersTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateReadFeaturedStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadFeaturedStickers#571d2742 as nil")
}
.PutID(UpdateReadFeaturedStickersTypeID)
return .EncodeBare()
}
func ( *UpdateReadFeaturedStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadFeaturedStickers#571d2742 as nil")
}
return nil
}
func ( *UpdateReadFeaturedStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadFeaturedStickers#571d2742 to nil")
}
if := .ConsumeID(UpdateReadFeaturedStickersTypeID); != nil {
return fmt.Errorf("unable to decode updateReadFeaturedStickers#571d2742: %w", )
}
return .DecodeBare()
}
func ( *UpdateReadFeaturedStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadFeaturedStickers#571d2742 to nil")
}
return nil
}
type UpdateRecentStickers struct {
}
const UpdateRecentStickersTypeID = 0x9a422c20
func ( UpdateRecentStickers) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateRecentStickers{}
_ bin.Decoder = &UpdateRecentStickers{}
_ bin.BareEncoder = &UpdateRecentStickers{}
_ bin.BareDecoder = &UpdateRecentStickers{}
_ UpdateClass = &UpdateRecentStickers{}
)
func ( *UpdateRecentStickers) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateRecentStickers) () string {
if == nil {
return "UpdateRecentStickers(nil)"
}
type UpdateRecentStickers
return fmt.Sprintf("UpdateRecentStickers%+v", (*))
}
func (*UpdateRecentStickers) () uint32 {
return UpdateRecentStickersTypeID
}
func (*UpdateRecentStickers) () string {
return "updateRecentStickers"
}
func ( *UpdateRecentStickers) () tdp.Type {
:= tdp.Type{
Name: "updateRecentStickers",
ID: UpdateRecentStickersTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateRecentStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateRecentStickers#9a422c20 as nil")
}
.PutID(UpdateRecentStickersTypeID)
return .EncodeBare()
}
func ( *UpdateRecentStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateRecentStickers#9a422c20 as nil")
}
return nil
}
func ( *UpdateRecentStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateRecentStickers#9a422c20 to nil")
}
if := .ConsumeID(UpdateRecentStickersTypeID); != nil {
return fmt.Errorf("unable to decode updateRecentStickers#9a422c20: %w", )
}
return .DecodeBare()
}
func ( *UpdateRecentStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateRecentStickers#9a422c20 to nil")
}
return nil
}
type UpdateConfig struct {
}
const UpdateConfigTypeID = 0xa229dd06
func ( UpdateConfig) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateConfig{}
_ bin.Decoder = &UpdateConfig{}
_ bin.BareEncoder = &UpdateConfig{}
_ bin.BareDecoder = &UpdateConfig{}
_ UpdateClass = &UpdateConfig{}
)
func ( *UpdateConfig) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateConfig) () string {
if == nil {
return "UpdateConfig(nil)"
}
type UpdateConfig
return fmt.Sprintf("UpdateConfig%+v", (*))
}
func (*UpdateConfig) () uint32 {
return UpdateConfigTypeID
}
func (*UpdateConfig) () string {
return "updateConfig"
}
func ( *UpdateConfig) () tdp.Type {
:= tdp.Type{
Name: "updateConfig",
ID: UpdateConfigTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateConfig) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateConfig#a229dd06 as nil")
}
.PutID(UpdateConfigTypeID)
return .EncodeBare()
}
func ( *UpdateConfig) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateConfig#a229dd06 as nil")
}
return nil
}
func ( *UpdateConfig) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateConfig#a229dd06 to nil")
}
if := .ConsumeID(UpdateConfigTypeID); != nil {
return fmt.Errorf("unable to decode updateConfig#a229dd06: %w", )
}
return .DecodeBare()
}
func ( *UpdateConfig) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateConfig#a229dd06 to nil")
}
return nil
}
type UpdatePtsChanged struct {
}
const UpdatePtsChangedTypeID = 0x3354678f
func ( UpdatePtsChanged) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePtsChanged{}
_ bin.Decoder = &UpdatePtsChanged{}
_ bin.BareEncoder = &UpdatePtsChanged{}
_ bin.BareDecoder = &UpdatePtsChanged{}
_ UpdateClass = &UpdatePtsChanged{}
)
func ( *UpdatePtsChanged) () bool {
if == nil {
return true
}
return true
}
func ( *UpdatePtsChanged) () string {
if == nil {
return "UpdatePtsChanged(nil)"
}
type UpdatePtsChanged
return fmt.Sprintf("UpdatePtsChanged%+v", (*))
}
func (*UpdatePtsChanged) () uint32 {
return UpdatePtsChangedTypeID
}
func (*UpdatePtsChanged) () string {
return "updatePtsChanged"
}
func ( *UpdatePtsChanged) () tdp.Type {
:= tdp.Type{
Name: "updatePtsChanged",
ID: UpdatePtsChangedTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdatePtsChanged) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePtsChanged#3354678f as nil")
}
.PutID(UpdatePtsChangedTypeID)
return .EncodeBare()
}
func ( *UpdatePtsChanged) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePtsChanged#3354678f as nil")
}
return nil
}
func ( *UpdatePtsChanged) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePtsChanged#3354678f to nil")
}
if := .ConsumeID(UpdatePtsChangedTypeID); != nil {
return fmt.Errorf("unable to decode updatePtsChanged#3354678f: %w", )
}
return .DecodeBare()
}
func ( *UpdatePtsChanged) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePtsChanged#3354678f to nil")
}
return nil
}
type UpdateChannelWebPage struct {
ChannelID int64
Webpage WebPageClass
Pts int
PtsCount int
}
const UpdateChannelWebPageTypeID = 0x2f2ba99f
func ( UpdateChannelWebPage) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChannelWebPage{}
_ bin.Decoder = &UpdateChannelWebPage{}
_ bin.BareEncoder = &UpdateChannelWebPage{}
_ bin.BareDecoder = &UpdateChannelWebPage{}
_ UpdateClass = &UpdateChannelWebPage{}
)
func ( *UpdateChannelWebPage) () bool {
if == nil {
return true
}
if !(.ChannelID == 0) {
return false
}
if !(.Webpage == nil) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdateChannelWebPage) () string {
if == nil {
return "UpdateChannelWebPage(nil)"
}
type UpdateChannelWebPage
return fmt.Sprintf("UpdateChannelWebPage%+v", (*))
}
func ( *UpdateChannelWebPage) ( interface {
() ( int64)
() ( WebPageClass)
() ( int)
() ( int)
}) {
.ChannelID = .()
.Webpage = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdateChannelWebPage) () uint32 {
return UpdateChannelWebPageTypeID
}
func (*UpdateChannelWebPage) () string {
return "updateChannelWebPage"
}
func ( *UpdateChannelWebPage) () tdp.Type {
:= tdp.Type{
Name: "updateChannelWebPage",
ID: UpdateChannelWebPageTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "Webpage",
SchemaName: "webpage",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdateChannelWebPage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelWebPage#2f2ba99f as nil")
}
.PutID(UpdateChannelWebPageTypeID)
return .EncodeBare()
}
func ( *UpdateChannelWebPage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelWebPage#2f2ba99f as nil")
}
.PutLong(.ChannelID)
if .Webpage == nil {
return fmt.Errorf("unable to encode updateChannelWebPage#2f2ba99f: field webpage is nil")
}
if := .Webpage.Encode(); != nil {
return fmt.Errorf("unable to encode updateChannelWebPage#2f2ba99f: field webpage: %w", )
}
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdateChannelWebPage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelWebPage#2f2ba99f to nil")
}
if := .ConsumeID(UpdateChannelWebPageTypeID); != nil {
return fmt.Errorf("unable to decode updateChannelWebPage#2f2ba99f: %w", )
}
return .DecodeBare()
}
func ( *UpdateChannelWebPage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelWebPage#2f2ba99f to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelWebPage#2f2ba99f: field channel_id: %w", )
}
.ChannelID =
}
{
, := DecodeWebPage()
if != nil {
return fmt.Errorf("unable to decode updateChannelWebPage#2f2ba99f: field webpage: %w", )
}
.Webpage =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelWebPage#2f2ba99f: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelWebPage#2f2ba99f: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdateChannelWebPage) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateChannelWebPage) () ( WebPageClass) {
if == nil {
return
}
return .Webpage
}
func ( *UpdateChannelWebPage) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdateChannelWebPage) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdateDialogPinned struct {
Flags bin.Fields
Pinned bool
FolderID int
Peer DialogPeerClass
}
const UpdateDialogPinnedTypeID = 0x6e6fe51c
func ( UpdateDialogPinned) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateDialogPinned{}
_ bin.Decoder = &UpdateDialogPinned{}
_ bin.BareEncoder = &UpdateDialogPinned{}
_ bin.BareDecoder = &UpdateDialogPinned{}
_ UpdateClass = &UpdateDialogPinned{}
)
func ( *UpdateDialogPinned) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Pinned == false) {
return false
}
if !(.FolderID == 0) {
return false
}
if !(.Peer == nil) {
return false
}
return true
}
func ( *UpdateDialogPinned) () string {
if == nil {
return "UpdateDialogPinned(nil)"
}
type UpdateDialogPinned
return fmt.Sprintf("UpdateDialogPinned%+v", (*))
}
func ( *UpdateDialogPinned) ( interface {
() ( bool)
() ( int, bool)
() ( DialogPeerClass)
}) {
.Pinned = .()
if , := .(); {
.FolderID =
}
.Peer = .()
}
func (*UpdateDialogPinned) () uint32 {
return UpdateDialogPinnedTypeID
}
func (*UpdateDialogPinned) () string {
return "updateDialogPinned"
}
func ( *UpdateDialogPinned) () tdp.Type {
:= tdp.Type{
Name: "updateDialogPinned",
ID: UpdateDialogPinnedTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Pinned",
SchemaName: "pinned",
Null: !.Flags.Has(0),
},
{
Name: "FolderID",
SchemaName: "folder_id",
Null: !.Flags.Has(1),
},
{
Name: "Peer",
SchemaName: "peer",
},
}
return
}
func ( *UpdateDialogPinned) () {
if !(.Pinned == false) {
.Flags.Set(0)
}
if !(.FolderID == 0) {
.Flags.Set(1)
}
}
func ( *UpdateDialogPinned) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDialogPinned#6e6fe51c as nil")
}
.PutID(UpdateDialogPinnedTypeID)
return .EncodeBare()
}
func ( *UpdateDialogPinned) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDialogPinned#6e6fe51c as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateDialogPinned#6e6fe51c: field flags: %w", )
}
if .Flags.Has(1) {
.PutInt(.FolderID)
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateDialogPinned#6e6fe51c: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateDialogPinned#6e6fe51c: field peer: %w", )
}
return nil
}
func ( *UpdateDialogPinned) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDialogPinned#6e6fe51c to nil")
}
if := .ConsumeID(UpdateDialogPinnedTypeID); != nil {
return fmt.Errorf("unable to decode updateDialogPinned#6e6fe51c: %w", )
}
return .DecodeBare()
}
func ( *UpdateDialogPinned) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDialogPinned#6e6fe51c to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateDialogPinned#6e6fe51c: field flags: %w", )
}
}
.Pinned = .Flags.Has(0)
if .Flags.Has(1) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateDialogPinned#6e6fe51c: field folder_id: %w", )
}
.FolderID =
}
{
, := DecodeDialogPeer()
if != nil {
return fmt.Errorf("unable to decode updateDialogPinned#6e6fe51c: field peer: %w", )
}
.Peer =
}
return nil
}
func ( *UpdateDialogPinned) ( bool) {
if {
.Flags.Set(0)
.Pinned = true
} else {
.Flags.Unset(0)
.Pinned = false
}
}
func ( *UpdateDialogPinned) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdateDialogPinned) ( int) {
.Flags.Set(1)
.FolderID =
}
func ( *UpdateDialogPinned) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(1) {
return , false
}
return .FolderID, true
}
func ( *UpdateDialogPinned) () ( DialogPeerClass) {
if == nil {
return
}
return .Peer
}
type UpdatePinnedDialogs struct {
Flags bin.Fields
FolderID int
Order []DialogPeerClass
}
const UpdatePinnedDialogsTypeID = 0xfa0f3ca2
func ( UpdatePinnedDialogs) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePinnedDialogs{}
_ bin.Decoder = &UpdatePinnedDialogs{}
_ bin.BareEncoder = &UpdatePinnedDialogs{}
_ bin.BareDecoder = &UpdatePinnedDialogs{}
_ UpdateClass = &UpdatePinnedDialogs{}
)
func ( *UpdatePinnedDialogs) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.FolderID == 0) {
return false
}
if !(.Order == nil) {
return false
}
return true
}
func ( *UpdatePinnedDialogs) () string {
if == nil {
return "UpdatePinnedDialogs(nil)"
}
type UpdatePinnedDialogs
return fmt.Sprintf("UpdatePinnedDialogs%+v", (*))
}
func ( *UpdatePinnedDialogs) ( interface {
() ( int, bool)
() ( []DialogPeerClass, bool)
}) {
if , := .(); {
.FolderID =
}
if , := .(); {
.Order =
}
}
func (*UpdatePinnedDialogs) () uint32 {
return UpdatePinnedDialogsTypeID
}
func (*UpdatePinnedDialogs) () string {
return "updatePinnedDialogs"
}
func ( *UpdatePinnedDialogs) () tdp.Type {
:= tdp.Type{
Name: "updatePinnedDialogs",
ID: UpdatePinnedDialogsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "FolderID",
SchemaName: "folder_id",
Null: !.Flags.Has(1),
},
{
Name: "Order",
SchemaName: "order",
Null: !.Flags.Has(0),
},
}
return
}
func ( *UpdatePinnedDialogs) () {
if !(.FolderID == 0) {
.Flags.Set(1)
}
if !(.Order == nil) {
.Flags.Set(0)
}
}
func ( *UpdatePinnedDialogs) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePinnedDialogs#fa0f3ca2 as nil")
}
.PutID(UpdatePinnedDialogsTypeID)
return .EncodeBare()
}
func ( *UpdatePinnedDialogs) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePinnedDialogs#fa0f3ca2 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updatePinnedDialogs#fa0f3ca2: field flags: %w", )
}
if .Flags.Has(1) {
.PutInt(.FolderID)
}
if .Flags.Has(0) {
.PutVectorHeader(len(.Order))
for , := range .Order {
if == nil {
return fmt.Errorf("unable to encode updatePinnedDialogs#fa0f3ca2: field order element with index %d is nil", )
}
if := .Encode(); != nil {
return fmt.Errorf("unable to encode updatePinnedDialogs#fa0f3ca2: field order element with index %d: %w", , )
}
}
}
return nil
}
func ( *UpdatePinnedDialogs) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePinnedDialogs#fa0f3ca2 to nil")
}
if := .ConsumeID(UpdatePinnedDialogsTypeID); != nil {
return fmt.Errorf("unable to decode updatePinnedDialogs#fa0f3ca2: %w", )
}
return .DecodeBare()
}
func ( *UpdatePinnedDialogs) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePinnedDialogs#fa0f3ca2 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updatePinnedDialogs#fa0f3ca2: field flags: %w", )
}
}
if .Flags.Has(1) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updatePinnedDialogs#fa0f3ca2: field folder_id: %w", )
}
.FolderID =
}
if .Flags.Has(0) {
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updatePinnedDialogs#fa0f3ca2: field order: %w", )
}
if > 0 {
.Order = make([]DialogPeerClass, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := DecodeDialogPeer()
if != nil {
return fmt.Errorf("unable to decode updatePinnedDialogs#fa0f3ca2: field order: %w", )
}
.Order = append(.Order, )
}
}
return nil
}
func ( *UpdatePinnedDialogs) ( int) {
.Flags.Set(1)
.FolderID =
}
func ( *UpdatePinnedDialogs) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(1) {
return , false
}
return .FolderID, true
}
func ( *UpdatePinnedDialogs) ( []DialogPeerClass) {
.Flags.Set(0)
.Order =
}
func ( *UpdatePinnedDialogs) () ( []DialogPeerClass, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Order, true
}
func ( *UpdatePinnedDialogs) () ( DialogPeerClassArray, bool) {
if !.Flags.Has(0) {
return , false
}
return DialogPeerClassArray(.Order), true
}
type UpdateBotWebhookJSON struct {
Data DataJSON
}
const UpdateBotWebhookJSONTypeID = 0x8317c0c3
func ( UpdateBotWebhookJSON) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotWebhookJSON{}
_ bin.Decoder = &UpdateBotWebhookJSON{}
_ bin.BareEncoder = &UpdateBotWebhookJSON{}
_ bin.BareDecoder = &UpdateBotWebhookJSON{}
_ UpdateClass = &UpdateBotWebhookJSON{}
)
func ( *UpdateBotWebhookJSON) () bool {
if == nil {
return true
}
if !(.Data.Zero()) {
return false
}
return true
}
func ( *UpdateBotWebhookJSON) () string {
if == nil {
return "UpdateBotWebhookJSON(nil)"
}
type UpdateBotWebhookJSON
return fmt.Sprintf("UpdateBotWebhookJSON%+v", (*))
}
func ( *UpdateBotWebhookJSON) ( interface {
() ( DataJSON)
}) {
.Data = .()
}
func (*UpdateBotWebhookJSON) () uint32 {
return UpdateBotWebhookJSONTypeID
}
func (*UpdateBotWebhookJSON) () string {
return "updateBotWebhookJSON"
}
func ( *UpdateBotWebhookJSON) () tdp.Type {
:= tdp.Type{
Name: "updateBotWebhookJSON",
ID: UpdateBotWebhookJSONTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Data",
SchemaName: "data",
},
}
return
}
func ( *UpdateBotWebhookJSON) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotWebhookJSON#8317c0c3 as nil")
}
.PutID(UpdateBotWebhookJSONTypeID)
return .EncodeBare()
}
func ( *UpdateBotWebhookJSON) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotWebhookJSON#8317c0c3 as nil")
}
if := .Data.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotWebhookJSON#8317c0c3: field data: %w", )
}
return nil
}
func ( *UpdateBotWebhookJSON) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotWebhookJSON#8317c0c3 to nil")
}
if := .ConsumeID(UpdateBotWebhookJSONTypeID); != nil {
return fmt.Errorf("unable to decode updateBotWebhookJSON#8317c0c3: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotWebhookJSON) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotWebhookJSON#8317c0c3 to nil")
}
{
if := .Data.Decode(); != nil {
return fmt.Errorf("unable to decode updateBotWebhookJSON#8317c0c3: field data: %w", )
}
}
return nil
}
func ( *UpdateBotWebhookJSON) () ( DataJSON) {
if == nil {
return
}
return .Data
}
type UpdateBotWebhookJSONQuery struct {
QueryID int64
Data DataJSON
Timeout int
}
const UpdateBotWebhookJSONQueryTypeID = 0x9b9240a6
func ( UpdateBotWebhookJSONQuery) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotWebhookJSONQuery{}
_ bin.Decoder = &UpdateBotWebhookJSONQuery{}
_ bin.BareEncoder = &UpdateBotWebhookJSONQuery{}
_ bin.BareDecoder = &UpdateBotWebhookJSONQuery{}
_ UpdateClass = &UpdateBotWebhookJSONQuery{}
)
func ( *UpdateBotWebhookJSONQuery) () bool {
if == nil {
return true
}
if !(.QueryID == 0) {
return false
}
if !(.Data.Zero()) {
return false
}
if !(.Timeout == 0) {
return false
}
return true
}
func ( *UpdateBotWebhookJSONQuery) () string {
if == nil {
return "UpdateBotWebhookJSONQuery(nil)"
}
type UpdateBotWebhookJSONQuery
return fmt.Sprintf("UpdateBotWebhookJSONQuery%+v", (*))
}
func ( *UpdateBotWebhookJSONQuery) ( interface {
() ( int64)
() ( DataJSON)
() ( int)
}) {
.QueryID = .()
.Data = .()
.Timeout = .()
}
func (*UpdateBotWebhookJSONQuery) () uint32 {
return UpdateBotWebhookJSONQueryTypeID
}
func (*UpdateBotWebhookJSONQuery) () string {
return "updateBotWebhookJSONQuery"
}
func ( *UpdateBotWebhookJSONQuery) () tdp.Type {
:= tdp.Type{
Name: "updateBotWebhookJSONQuery",
ID: UpdateBotWebhookJSONQueryTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "QueryID",
SchemaName: "query_id",
},
{
Name: "Data",
SchemaName: "data",
},
{
Name: "Timeout",
SchemaName: "timeout",
},
}
return
}
func ( *UpdateBotWebhookJSONQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotWebhookJSONQuery#9b9240a6 as nil")
}
.PutID(UpdateBotWebhookJSONQueryTypeID)
return .EncodeBare()
}
func ( *UpdateBotWebhookJSONQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotWebhookJSONQuery#9b9240a6 as nil")
}
.PutLong(.QueryID)
if := .Data.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotWebhookJSONQuery#9b9240a6: field data: %w", )
}
.PutInt(.Timeout)
return nil
}
func ( *UpdateBotWebhookJSONQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotWebhookJSONQuery#9b9240a6 to nil")
}
if := .ConsumeID(UpdateBotWebhookJSONQueryTypeID); != nil {
return fmt.Errorf("unable to decode updateBotWebhookJSONQuery#9b9240a6: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotWebhookJSONQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotWebhookJSONQuery#9b9240a6 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotWebhookJSONQuery#9b9240a6: field query_id: %w", )
}
.QueryID =
}
{
if := .Data.Decode(); != nil {
return fmt.Errorf("unable to decode updateBotWebhookJSONQuery#9b9240a6: field data: %w", )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotWebhookJSONQuery#9b9240a6: field timeout: %w", )
}
.Timeout =
}
return nil
}
func ( *UpdateBotWebhookJSONQuery) () ( int64) {
if == nil {
return
}
return .QueryID
}
func ( *UpdateBotWebhookJSONQuery) () ( DataJSON) {
if == nil {
return
}
return .Data
}
func ( *UpdateBotWebhookJSONQuery) () ( int) {
if == nil {
return
}
return .Timeout
}
type UpdateBotShippingQuery struct {
QueryID int64
UserID int64
Payload []byte
ShippingAddress PostAddress
}
const UpdateBotShippingQueryTypeID = 0xb5aefd7d
func ( UpdateBotShippingQuery) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotShippingQuery{}
_ bin.Decoder = &UpdateBotShippingQuery{}
_ bin.BareEncoder = &UpdateBotShippingQuery{}
_ bin.BareDecoder = &UpdateBotShippingQuery{}
_ UpdateClass = &UpdateBotShippingQuery{}
)
func ( *UpdateBotShippingQuery) () bool {
if == nil {
return true
}
if !(.QueryID == 0) {
return false
}
if !(.UserID == 0) {
return false
}
if !(.Payload == nil) {
return false
}
if !(.ShippingAddress.Zero()) {
return false
}
return true
}
func ( *UpdateBotShippingQuery) () string {
if == nil {
return "UpdateBotShippingQuery(nil)"
}
type UpdateBotShippingQuery
return fmt.Sprintf("UpdateBotShippingQuery%+v", (*))
}
func ( *UpdateBotShippingQuery) ( interface {
() ( int64)
() ( int64)
() ( []byte)
() ( PostAddress)
}) {
.QueryID = .()
.UserID = .()
.Payload = .()
.ShippingAddress = .()
}
func (*UpdateBotShippingQuery) () uint32 {
return UpdateBotShippingQueryTypeID
}
func (*UpdateBotShippingQuery) () string {
return "updateBotShippingQuery"
}
func ( *UpdateBotShippingQuery) () tdp.Type {
:= tdp.Type{
Name: "updateBotShippingQuery",
ID: UpdateBotShippingQueryTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "QueryID",
SchemaName: "query_id",
},
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "Payload",
SchemaName: "payload",
},
{
Name: "ShippingAddress",
SchemaName: "shipping_address",
},
}
return
}
func ( *UpdateBotShippingQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotShippingQuery#b5aefd7d as nil")
}
.PutID(UpdateBotShippingQueryTypeID)
return .EncodeBare()
}
func ( *UpdateBotShippingQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotShippingQuery#b5aefd7d as nil")
}
.PutLong(.QueryID)
.PutLong(.UserID)
.PutBytes(.Payload)
if := .ShippingAddress.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotShippingQuery#b5aefd7d: field shipping_address: %w", )
}
return nil
}
func ( *UpdateBotShippingQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotShippingQuery#b5aefd7d to nil")
}
if := .ConsumeID(UpdateBotShippingQueryTypeID); != nil {
return fmt.Errorf("unable to decode updateBotShippingQuery#b5aefd7d: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotShippingQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotShippingQuery#b5aefd7d to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotShippingQuery#b5aefd7d: field query_id: %w", )
}
.QueryID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotShippingQuery#b5aefd7d: field user_id: %w", )
}
.UserID =
}
{
, := .Bytes()
if != nil {
return fmt.Errorf("unable to decode updateBotShippingQuery#b5aefd7d: field payload: %w", )
}
.Payload =
}
{
if := .ShippingAddress.Decode(); != nil {
return fmt.Errorf("unable to decode updateBotShippingQuery#b5aefd7d: field shipping_address: %w", )
}
}
return nil
}
func ( *UpdateBotShippingQuery) () ( int64) {
if == nil {
return
}
return .QueryID
}
func ( *UpdateBotShippingQuery) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateBotShippingQuery) () ( []byte) {
if == nil {
return
}
return .Payload
}
func ( *UpdateBotShippingQuery) () ( PostAddress) {
if == nil {
return
}
return .ShippingAddress
}
type UpdateBotPrecheckoutQuery struct {
Flags bin.Fields
QueryID int64
UserID int64
Payload []byte
Info PaymentRequestedInfo
ShippingOptionID string
Currency string
TotalAmount int64
}
const UpdateBotPrecheckoutQueryTypeID = 0x8caa9a96
func ( UpdateBotPrecheckoutQuery) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotPrecheckoutQuery{}
_ bin.Decoder = &UpdateBotPrecheckoutQuery{}
_ bin.BareEncoder = &UpdateBotPrecheckoutQuery{}
_ bin.BareDecoder = &UpdateBotPrecheckoutQuery{}
_ UpdateClass = &UpdateBotPrecheckoutQuery{}
)
func ( *UpdateBotPrecheckoutQuery) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.QueryID == 0) {
return false
}
if !(.UserID == 0) {
return false
}
if !(.Payload == nil) {
return false
}
if !(.Info.Zero()) {
return false
}
if !(.ShippingOptionID == "") {
return false
}
if !(.Currency == "") {
return false
}
if !(.TotalAmount == 0) {
return false
}
return true
}
func ( *UpdateBotPrecheckoutQuery) () string {
if == nil {
return "UpdateBotPrecheckoutQuery(nil)"
}
type UpdateBotPrecheckoutQuery
return fmt.Sprintf("UpdateBotPrecheckoutQuery%+v", (*))
}
func ( *UpdateBotPrecheckoutQuery) ( interface {
() ( int64)
() ( int64)
() ( []byte)
() ( PaymentRequestedInfo, bool)
() ( string, bool)
() ( string)
() ( int64)
}) {
.QueryID = .()
.UserID = .()
.Payload = .()
if , := .(); {
.Info =
}
if , := .(); {
.ShippingOptionID =
}
.Currency = .()
.TotalAmount = .()
}
func (*UpdateBotPrecheckoutQuery) () uint32 {
return UpdateBotPrecheckoutQueryTypeID
}
func (*UpdateBotPrecheckoutQuery) () string {
return "updateBotPrecheckoutQuery"
}
func ( *UpdateBotPrecheckoutQuery) () tdp.Type {
:= tdp.Type{
Name: "updateBotPrecheckoutQuery",
ID: UpdateBotPrecheckoutQueryTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "QueryID",
SchemaName: "query_id",
},
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "Payload",
SchemaName: "payload",
},
{
Name: "Info",
SchemaName: "info",
Null: !.Flags.Has(0),
},
{
Name: "ShippingOptionID",
SchemaName: "shipping_option_id",
Null: !.Flags.Has(1),
},
{
Name: "Currency",
SchemaName: "currency",
},
{
Name: "TotalAmount",
SchemaName: "total_amount",
},
}
return
}
func ( *UpdateBotPrecheckoutQuery) () {
if !(.Info.Zero()) {
.Flags.Set(0)
}
if !(.ShippingOptionID == "") {
.Flags.Set(1)
}
}
func ( *UpdateBotPrecheckoutQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotPrecheckoutQuery#8caa9a96 as nil")
}
.PutID(UpdateBotPrecheckoutQueryTypeID)
return .EncodeBare()
}
func ( *UpdateBotPrecheckoutQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotPrecheckoutQuery#8caa9a96 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotPrecheckoutQuery#8caa9a96: field flags: %w", )
}
.PutLong(.QueryID)
.PutLong(.UserID)
.PutBytes(.Payload)
if .Flags.Has(0) {
if := .Info.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotPrecheckoutQuery#8caa9a96: field info: %w", )
}
}
if .Flags.Has(1) {
.PutString(.ShippingOptionID)
}
.PutString(.Currency)
.PutLong(.TotalAmount)
return nil
}
func ( *UpdateBotPrecheckoutQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotPrecheckoutQuery#8caa9a96 to nil")
}
if := .ConsumeID(UpdateBotPrecheckoutQueryTypeID); != nil {
return fmt.Errorf("unable to decode updateBotPrecheckoutQuery#8caa9a96: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotPrecheckoutQuery) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotPrecheckoutQuery#8caa9a96 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateBotPrecheckoutQuery#8caa9a96: field flags: %w", )
}
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotPrecheckoutQuery#8caa9a96: field query_id: %w", )
}
.QueryID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotPrecheckoutQuery#8caa9a96: field user_id: %w", )
}
.UserID =
}
{
, := .Bytes()
if != nil {
return fmt.Errorf("unable to decode updateBotPrecheckoutQuery#8caa9a96: field payload: %w", )
}
.Payload =
}
if .Flags.Has(0) {
if := .Info.Decode(); != nil {
return fmt.Errorf("unable to decode updateBotPrecheckoutQuery#8caa9a96: field info: %w", )
}
}
if .Flags.Has(1) {
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateBotPrecheckoutQuery#8caa9a96: field shipping_option_id: %w", )
}
.ShippingOptionID =
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateBotPrecheckoutQuery#8caa9a96: field currency: %w", )
}
.Currency =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotPrecheckoutQuery#8caa9a96: field total_amount: %w", )
}
.TotalAmount =
}
return nil
}
func ( *UpdateBotPrecheckoutQuery) () ( int64) {
if == nil {
return
}
return .QueryID
}
func ( *UpdateBotPrecheckoutQuery) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateBotPrecheckoutQuery) () ( []byte) {
if == nil {
return
}
return .Payload
}
func ( *UpdateBotPrecheckoutQuery) ( PaymentRequestedInfo) {
.Flags.Set(0)
.Info =
}
func ( *UpdateBotPrecheckoutQuery) () ( PaymentRequestedInfo, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Info, true
}
func ( *UpdateBotPrecheckoutQuery) ( string) {
.Flags.Set(1)
.ShippingOptionID =
}
func ( *UpdateBotPrecheckoutQuery) () ( string, bool) {
if == nil {
return
}
if !.Flags.Has(1) {
return , false
}
return .ShippingOptionID, true
}
func ( *UpdateBotPrecheckoutQuery) () ( string) {
if == nil {
return
}
return .Currency
}
func ( *UpdateBotPrecheckoutQuery) () ( int64) {
if == nil {
return
}
return .TotalAmount
}
type UpdatePhoneCall struct {
PhoneCall PhoneCallClass
}
const UpdatePhoneCallTypeID = 0xab0f6b1e
func ( UpdatePhoneCall) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePhoneCall{}
_ bin.Decoder = &UpdatePhoneCall{}
_ bin.BareEncoder = &UpdatePhoneCall{}
_ bin.BareDecoder = &UpdatePhoneCall{}
_ UpdateClass = &UpdatePhoneCall{}
)
func ( *UpdatePhoneCall) () bool {
if == nil {
return true
}
if !(.PhoneCall == nil) {
return false
}
return true
}
func ( *UpdatePhoneCall) () string {
if == nil {
return "UpdatePhoneCall(nil)"
}
type UpdatePhoneCall
return fmt.Sprintf("UpdatePhoneCall%+v", (*))
}
func ( *UpdatePhoneCall) ( interface {
() ( PhoneCallClass)
}) {
.PhoneCall = .()
}
func (*UpdatePhoneCall) () uint32 {
return UpdatePhoneCallTypeID
}
func (*UpdatePhoneCall) () string {
return "updatePhoneCall"
}
func ( *UpdatePhoneCall) () tdp.Type {
:= tdp.Type{
Name: "updatePhoneCall",
ID: UpdatePhoneCallTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "PhoneCall",
SchemaName: "phone_call",
},
}
return
}
func ( *UpdatePhoneCall) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePhoneCall#ab0f6b1e as nil")
}
.PutID(UpdatePhoneCallTypeID)
return .EncodeBare()
}
func ( *UpdatePhoneCall) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePhoneCall#ab0f6b1e as nil")
}
if .PhoneCall == nil {
return fmt.Errorf("unable to encode updatePhoneCall#ab0f6b1e: field phone_call is nil")
}
if := .PhoneCall.Encode(); != nil {
return fmt.Errorf("unable to encode updatePhoneCall#ab0f6b1e: field phone_call: %w", )
}
return nil
}
func ( *UpdatePhoneCall) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePhoneCall#ab0f6b1e to nil")
}
if := .ConsumeID(UpdatePhoneCallTypeID); != nil {
return fmt.Errorf("unable to decode updatePhoneCall#ab0f6b1e: %w", )
}
return .DecodeBare()
}
func ( *UpdatePhoneCall) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePhoneCall#ab0f6b1e to nil")
}
{
, := DecodePhoneCall()
if != nil {
return fmt.Errorf("unable to decode updatePhoneCall#ab0f6b1e: field phone_call: %w", )
}
.PhoneCall =
}
return nil
}
func ( *UpdatePhoneCall) () ( PhoneCallClass) {
if == nil {
return
}
return .PhoneCall
}
type UpdateLangPackTooLong struct {
LangCode string
}
const UpdateLangPackTooLongTypeID = 0x46560264
func ( UpdateLangPackTooLong) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateLangPackTooLong{}
_ bin.Decoder = &UpdateLangPackTooLong{}
_ bin.BareEncoder = &UpdateLangPackTooLong{}
_ bin.BareDecoder = &UpdateLangPackTooLong{}
_ UpdateClass = &UpdateLangPackTooLong{}
)
func ( *UpdateLangPackTooLong) () bool {
if == nil {
return true
}
if !(.LangCode == "") {
return false
}
return true
}
func ( *UpdateLangPackTooLong) () string {
if == nil {
return "UpdateLangPackTooLong(nil)"
}
type UpdateLangPackTooLong
return fmt.Sprintf("UpdateLangPackTooLong%+v", (*))
}
func ( *UpdateLangPackTooLong) ( interface {
() ( string)
}) {
.LangCode = .()
}
func (*UpdateLangPackTooLong) () uint32 {
return UpdateLangPackTooLongTypeID
}
func (*UpdateLangPackTooLong) () string {
return "updateLangPackTooLong"
}
func ( *UpdateLangPackTooLong) () tdp.Type {
:= tdp.Type{
Name: "updateLangPackTooLong",
ID: UpdateLangPackTooLongTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "LangCode",
SchemaName: "lang_code",
},
}
return
}
func ( *UpdateLangPackTooLong) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateLangPackTooLong#46560264 as nil")
}
.PutID(UpdateLangPackTooLongTypeID)
return .EncodeBare()
}
func ( *UpdateLangPackTooLong) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateLangPackTooLong#46560264 as nil")
}
.PutString(.LangCode)
return nil
}
func ( *UpdateLangPackTooLong) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateLangPackTooLong#46560264 to nil")
}
if := .ConsumeID(UpdateLangPackTooLongTypeID); != nil {
return fmt.Errorf("unable to decode updateLangPackTooLong#46560264: %w", )
}
return .DecodeBare()
}
func ( *UpdateLangPackTooLong) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateLangPackTooLong#46560264 to nil")
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateLangPackTooLong#46560264: field lang_code: %w", )
}
.LangCode =
}
return nil
}
func ( *UpdateLangPackTooLong) () ( string) {
if == nil {
return
}
return .LangCode
}
type UpdateLangPack struct {
Difference LangPackDifference
}
const UpdateLangPackTypeID = 0x56022f4d
func ( UpdateLangPack) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateLangPack{}
_ bin.Decoder = &UpdateLangPack{}
_ bin.BareEncoder = &UpdateLangPack{}
_ bin.BareDecoder = &UpdateLangPack{}
_ UpdateClass = &UpdateLangPack{}
)
func ( *UpdateLangPack) () bool {
if == nil {
return true
}
if !(.Difference.Zero()) {
return false
}
return true
}
func ( *UpdateLangPack) () string {
if == nil {
return "UpdateLangPack(nil)"
}
type UpdateLangPack
return fmt.Sprintf("UpdateLangPack%+v", (*))
}
func ( *UpdateLangPack) ( interface {
() ( LangPackDifference)
}) {
.Difference = .()
}
func (*UpdateLangPack) () uint32 {
return UpdateLangPackTypeID
}
func (*UpdateLangPack) () string {
return "updateLangPack"
}
func ( *UpdateLangPack) () tdp.Type {
:= tdp.Type{
Name: "updateLangPack",
ID: UpdateLangPackTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Difference",
SchemaName: "difference",
},
}
return
}
func ( *UpdateLangPack) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateLangPack#56022f4d as nil")
}
.PutID(UpdateLangPackTypeID)
return .EncodeBare()
}
func ( *UpdateLangPack) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateLangPack#56022f4d as nil")
}
if := .Difference.Encode(); != nil {
return fmt.Errorf("unable to encode updateLangPack#56022f4d: field difference: %w", )
}
return nil
}
func ( *UpdateLangPack) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateLangPack#56022f4d to nil")
}
if := .ConsumeID(UpdateLangPackTypeID); != nil {
return fmt.Errorf("unable to decode updateLangPack#56022f4d: %w", )
}
return .DecodeBare()
}
func ( *UpdateLangPack) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateLangPack#56022f4d to nil")
}
{
if := .Difference.Decode(); != nil {
return fmt.Errorf("unable to decode updateLangPack#56022f4d: field difference: %w", )
}
}
return nil
}
func ( *UpdateLangPack) () ( LangPackDifference) {
if == nil {
return
}
return .Difference
}
type UpdateFavedStickers struct {
}
const UpdateFavedStickersTypeID = 0xe511996d
func ( UpdateFavedStickers) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateFavedStickers{}
_ bin.Decoder = &UpdateFavedStickers{}
_ bin.BareEncoder = &UpdateFavedStickers{}
_ bin.BareDecoder = &UpdateFavedStickers{}
_ UpdateClass = &UpdateFavedStickers{}
)
func ( *UpdateFavedStickers) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateFavedStickers) () string {
if == nil {
return "UpdateFavedStickers(nil)"
}
type UpdateFavedStickers
return fmt.Sprintf("UpdateFavedStickers%+v", (*))
}
func (*UpdateFavedStickers) () uint32 {
return UpdateFavedStickersTypeID
}
func (*UpdateFavedStickers) () string {
return "updateFavedStickers"
}
func ( *UpdateFavedStickers) () tdp.Type {
:= tdp.Type{
Name: "updateFavedStickers",
ID: UpdateFavedStickersTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateFavedStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateFavedStickers#e511996d as nil")
}
.PutID(UpdateFavedStickersTypeID)
return .EncodeBare()
}
func ( *UpdateFavedStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateFavedStickers#e511996d as nil")
}
return nil
}
func ( *UpdateFavedStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateFavedStickers#e511996d to nil")
}
if := .ConsumeID(UpdateFavedStickersTypeID); != nil {
return fmt.Errorf("unable to decode updateFavedStickers#e511996d: %w", )
}
return .DecodeBare()
}
func ( *UpdateFavedStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateFavedStickers#e511996d to nil")
}
return nil
}
type UpdateChannelReadMessagesContents struct {
Flags bin.Fields
ChannelID int64
TopMsgID int
Messages []int
}
const UpdateChannelReadMessagesContentsTypeID = 0xea29055d
func ( UpdateChannelReadMessagesContents) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChannelReadMessagesContents{}
_ bin.Decoder = &UpdateChannelReadMessagesContents{}
_ bin.BareEncoder = &UpdateChannelReadMessagesContents{}
_ bin.BareDecoder = &UpdateChannelReadMessagesContents{}
_ UpdateClass = &UpdateChannelReadMessagesContents{}
)
func ( *UpdateChannelReadMessagesContents) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.ChannelID == 0) {
return false
}
if !(.TopMsgID == 0) {
return false
}
if !(.Messages == nil) {
return false
}
return true
}
func ( *UpdateChannelReadMessagesContents) () string {
if == nil {
return "UpdateChannelReadMessagesContents(nil)"
}
type UpdateChannelReadMessagesContents
return fmt.Sprintf("UpdateChannelReadMessagesContents%+v", (*))
}
func ( *UpdateChannelReadMessagesContents) ( interface {
() ( int64)
() ( int, bool)
() ( []int)
}) {
.ChannelID = .()
if , := .(); {
.TopMsgID =
}
.Messages = .()
}
func (*UpdateChannelReadMessagesContents) () uint32 {
return UpdateChannelReadMessagesContentsTypeID
}
func (*UpdateChannelReadMessagesContents) () string {
return "updateChannelReadMessagesContents"
}
func ( *UpdateChannelReadMessagesContents) () tdp.Type {
:= tdp.Type{
Name: "updateChannelReadMessagesContents",
ID: UpdateChannelReadMessagesContentsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "TopMsgID",
SchemaName: "top_msg_id",
Null: !.Flags.Has(0),
},
{
Name: "Messages",
SchemaName: "messages",
},
}
return
}
func ( *UpdateChannelReadMessagesContents) () {
if !(.TopMsgID == 0) {
.Flags.Set(0)
}
}
func ( *UpdateChannelReadMessagesContents) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelReadMessagesContents#ea29055d as nil")
}
.PutID(UpdateChannelReadMessagesContentsTypeID)
return .EncodeBare()
}
func ( *UpdateChannelReadMessagesContents) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelReadMessagesContents#ea29055d as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateChannelReadMessagesContents#ea29055d: field flags: %w", )
}
.PutLong(.ChannelID)
if .Flags.Has(0) {
.PutInt(.TopMsgID)
}
.PutVectorHeader(len(.Messages))
for , := range .Messages {
.PutInt()
}
return nil
}
func ( *UpdateChannelReadMessagesContents) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelReadMessagesContents#ea29055d to nil")
}
if := .ConsumeID(UpdateChannelReadMessagesContentsTypeID); != nil {
return fmt.Errorf("unable to decode updateChannelReadMessagesContents#ea29055d: %w", )
}
return .DecodeBare()
}
func ( *UpdateChannelReadMessagesContents) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelReadMessagesContents#ea29055d to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateChannelReadMessagesContents#ea29055d: field flags: %w", )
}
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelReadMessagesContents#ea29055d: field channel_id: %w", )
}
.ChannelID =
}
if .Flags.Has(0) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelReadMessagesContents#ea29055d: field top_msg_id: %w", )
}
.TopMsgID =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateChannelReadMessagesContents#ea29055d: field messages: %w", )
}
if > 0 {
.Messages = make([]int, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelReadMessagesContents#ea29055d: field messages: %w", )
}
.Messages = append(.Messages, )
}
}
return nil
}
func ( *UpdateChannelReadMessagesContents) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateChannelReadMessagesContents) ( int) {
.Flags.Set(0)
.TopMsgID =
}
func ( *UpdateChannelReadMessagesContents) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .TopMsgID, true
}
func ( *UpdateChannelReadMessagesContents) () ( []int) {
if == nil {
return
}
return .Messages
}
type UpdateContactsReset struct {
}
const UpdateContactsResetTypeID = 0x7084a7be
func ( UpdateContactsReset) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateContactsReset{}
_ bin.Decoder = &UpdateContactsReset{}
_ bin.BareEncoder = &UpdateContactsReset{}
_ bin.BareDecoder = &UpdateContactsReset{}
_ UpdateClass = &UpdateContactsReset{}
)
func ( *UpdateContactsReset) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateContactsReset) () string {
if == nil {
return "UpdateContactsReset(nil)"
}
type UpdateContactsReset
return fmt.Sprintf("UpdateContactsReset%+v", (*))
}
func (*UpdateContactsReset) () uint32 {
return UpdateContactsResetTypeID
}
func (*UpdateContactsReset) () string {
return "updateContactsReset"
}
func ( *UpdateContactsReset) () tdp.Type {
:= tdp.Type{
Name: "updateContactsReset",
ID: UpdateContactsResetTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateContactsReset) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateContactsReset#7084a7be as nil")
}
.PutID(UpdateContactsResetTypeID)
return .EncodeBare()
}
func ( *UpdateContactsReset) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateContactsReset#7084a7be as nil")
}
return nil
}
func ( *UpdateContactsReset) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateContactsReset#7084a7be to nil")
}
if := .ConsumeID(UpdateContactsResetTypeID); != nil {
return fmt.Errorf("unable to decode updateContactsReset#7084a7be: %w", )
}
return .DecodeBare()
}
func ( *UpdateContactsReset) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateContactsReset#7084a7be to nil")
}
return nil
}
type UpdateChannelAvailableMessages struct {
ChannelID int64
AvailableMinID int
}
const UpdateChannelAvailableMessagesTypeID = 0xb23fc698
func ( UpdateChannelAvailableMessages) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChannelAvailableMessages{}
_ bin.Decoder = &UpdateChannelAvailableMessages{}
_ bin.BareEncoder = &UpdateChannelAvailableMessages{}
_ bin.BareDecoder = &UpdateChannelAvailableMessages{}
_ UpdateClass = &UpdateChannelAvailableMessages{}
)
func ( *UpdateChannelAvailableMessages) () bool {
if == nil {
return true
}
if !(.ChannelID == 0) {
return false
}
if !(.AvailableMinID == 0) {
return false
}
return true
}
func ( *UpdateChannelAvailableMessages) () string {
if == nil {
return "UpdateChannelAvailableMessages(nil)"
}
type UpdateChannelAvailableMessages
return fmt.Sprintf("UpdateChannelAvailableMessages%+v", (*))
}
func ( *UpdateChannelAvailableMessages) ( interface {
() ( int64)
() ( int)
}) {
.ChannelID = .()
.AvailableMinID = .()
}
func (*UpdateChannelAvailableMessages) () uint32 {
return UpdateChannelAvailableMessagesTypeID
}
func (*UpdateChannelAvailableMessages) () string {
return "updateChannelAvailableMessages"
}
func ( *UpdateChannelAvailableMessages) () tdp.Type {
:= tdp.Type{
Name: "updateChannelAvailableMessages",
ID: UpdateChannelAvailableMessagesTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "AvailableMinID",
SchemaName: "available_min_id",
},
}
return
}
func ( *UpdateChannelAvailableMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelAvailableMessages#b23fc698 as nil")
}
.PutID(UpdateChannelAvailableMessagesTypeID)
return .EncodeBare()
}
func ( *UpdateChannelAvailableMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelAvailableMessages#b23fc698 as nil")
}
.PutLong(.ChannelID)
.PutInt(.AvailableMinID)
return nil
}
func ( *UpdateChannelAvailableMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelAvailableMessages#b23fc698 to nil")
}
if := .ConsumeID(UpdateChannelAvailableMessagesTypeID); != nil {
return fmt.Errorf("unable to decode updateChannelAvailableMessages#b23fc698: %w", )
}
return .DecodeBare()
}
func ( *UpdateChannelAvailableMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelAvailableMessages#b23fc698 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelAvailableMessages#b23fc698: field channel_id: %w", )
}
.ChannelID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelAvailableMessages#b23fc698: field available_min_id: %w", )
}
.AvailableMinID =
}
return nil
}
func ( *UpdateChannelAvailableMessages) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateChannelAvailableMessages) () ( int) {
if == nil {
return
}
return .AvailableMinID
}
type UpdateDialogUnreadMark struct {
Flags bin.Fields
Unread bool
Peer DialogPeerClass
}
const UpdateDialogUnreadMarkTypeID = 0xe16459c3
func ( UpdateDialogUnreadMark) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateDialogUnreadMark{}
_ bin.Decoder = &UpdateDialogUnreadMark{}
_ bin.BareEncoder = &UpdateDialogUnreadMark{}
_ bin.BareDecoder = &UpdateDialogUnreadMark{}
_ UpdateClass = &UpdateDialogUnreadMark{}
)
func ( *UpdateDialogUnreadMark) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Unread == false) {
return false
}
if !(.Peer == nil) {
return false
}
return true
}
func ( *UpdateDialogUnreadMark) () string {
if == nil {
return "UpdateDialogUnreadMark(nil)"
}
type UpdateDialogUnreadMark
return fmt.Sprintf("UpdateDialogUnreadMark%+v", (*))
}
func ( *UpdateDialogUnreadMark) ( interface {
() ( bool)
() ( DialogPeerClass)
}) {
.Unread = .()
.Peer = .()
}
func (*UpdateDialogUnreadMark) () uint32 {
return UpdateDialogUnreadMarkTypeID
}
func (*UpdateDialogUnreadMark) () string {
return "updateDialogUnreadMark"
}
func ( *UpdateDialogUnreadMark) () tdp.Type {
:= tdp.Type{
Name: "updateDialogUnreadMark",
ID: UpdateDialogUnreadMarkTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Unread",
SchemaName: "unread",
Null: !.Flags.Has(0),
},
{
Name: "Peer",
SchemaName: "peer",
},
}
return
}
func ( *UpdateDialogUnreadMark) () {
if !(.Unread == false) {
.Flags.Set(0)
}
}
func ( *UpdateDialogUnreadMark) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDialogUnreadMark#e16459c3 as nil")
}
.PutID(UpdateDialogUnreadMarkTypeID)
return .EncodeBare()
}
func ( *UpdateDialogUnreadMark) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDialogUnreadMark#e16459c3 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateDialogUnreadMark#e16459c3: field flags: %w", )
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateDialogUnreadMark#e16459c3: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateDialogUnreadMark#e16459c3: field peer: %w", )
}
return nil
}
func ( *UpdateDialogUnreadMark) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDialogUnreadMark#e16459c3 to nil")
}
if := .ConsumeID(UpdateDialogUnreadMarkTypeID); != nil {
return fmt.Errorf("unable to decode updateDialogUnreadMark#e16459c3: %w", )
}
return .DecodeBare()
}
func ( *UpdateDialogUnreadMark) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDialogUnreadMark#e16459c3 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateDialogUnreadMark#e16459c3: field flags: %w", )
}
}
.Unread = .Flags.Has(0)
{
, := DecodeDialogPeer()
if != nil {
return fmt.Errorf("unable to decode updateDialogUnreadMark#e16459c3: field peer: %w", )
}
.Peer =
}
return nil
}
func ( *UpdateDialogUnreadMark) ( bool) {
if {
.Flags.Set(0)
.Unread = true
} else {
.Flags.Unset(0)
.Unread = false
}
}
func ( *UpdateDialogUnreadMark) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdateDialogUnreadMark) () ( DialogPeerClass) {
if == nil {
return
}
return .Peer
}
type UpdateMessagePoll struct {
Flags bin.Fields
PollID int64
Poll Poll
Results PollResults
}
const UpdateMessagePollTypeID = 0xaca1657b
func ( UpdateMessagePoll) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateMessagePoll{}
_ bin.Decoder = &UpdateMessagePoll{}
_ bin.BareEncoder = &UpdateMessagePoll{}
_ bin.BareDecoder = &UpdateMessagePoll{}
_ UpdateClass = &UpdateMessagePoll{}
)
func ( *UpdateMessagePoll) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.PollID == 0) {
return false
}
if !(.Poll.Zero()) {
return false
}
if !(.Results.Zero()) {
return false
}
return true
}
func ( *UpdateMessagePoll) () string {
if == nil {
return "UpdateMessagePoll(nil)"
}
type UpdateMessagePoll
return fmt.Sprintf("UpdateMessagePoll%+v", (*))
}
func ( *UpdateMessagePoll) ( interface {
() ( int64)
() ( Poll, bool)
() ( PollResults)
}) {
.PollID = .()
if , := .(); {
.Poll =
}
.Results = .()
}
func (*UpdateMessagePoll) () uint32 {
return UpdateMessagePollTypeID
}
func (*UpdateMessagePoll) () string {
return "updateMessagePoll"
}
func ( *UpdateMessagePoll) () tdp.Type {
:= tdp.Type{
Name: "updateMessagePoll",
ID: UpdateMessagePollTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "PollID",
SchemaName: "poll_id",
},
{
Name: "Poll",
SchemaName: "poll",
Null: !.Flags.Has(0),
},
{
Name: "Results",
SchemaName: "results",
},
}
return
}
func ( *UpdateMessagePoll) () {
if !(.Poll.Zero()) {
.Flags.Set(0)
}
}
func ( *UpdateMessagePoll) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateMessagePoll#aca1657b as nil")
}
.PutID(UpdateMessagePollTypeID)
return .EncodeBare()
}
func ( *UpdateMessagePoll) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateMessagePoll#aca1657b as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateMessagePoll#aca1657b: field flags: %w", )
}
.PutLong(.PollID)
if .Flags.Has(0) {
if := .Poll.Encode(); != nil {
return fmt.Errorf("unable to encode updateMessagePoll#aca1657b: field poll: %w", )
}
}
if := .Results.Encode(); != nil {
return fmt.Errorf("unable to encode updateMessagePoll#aca1657b: field results: %w", )
}
return nil
}
func ( *UpdateMessagePoll) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateMessagePoll#aca1657b to nil")
}
if := .ConsumeID(UpdateMessagePollTypeID); != nil {
return fmt.Errorf("unable to decode updateMessagePoll#aca1657b: %w", )
}
return .DecodeBare()
}
func ( *UpdateMessagePoll) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateMessagePoll#aca1657b to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateMessagePoll#aca1657b: field flags: %w", )
}
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateMessagePoll#aca1657b: field poll_id: %w", )
}
.PollID =
}
if .Flags.Has(0) {
if := .Poll.Decode(); != nil {
return fmt.Errorf("unable to decode updateMessagePoll#aca1657b: field poll: %w", )
}
}
{
if := .Results.Decode(); != nil {
return fmt.Errorf("unable to decode updateMessagePoll#aca1657b: field results: %w", )
}
}
return nil
}
func ( *UpdateMessagePoll) () ( int64) {
if == nil {
return
}
return .PollID
}
func ( *UpdateMessagePoll) ( Poll) {
.Flags.Set(0)
.Poll =
}
func ( *UpdateMessagePoll) () ( Poll, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Poll, true
}
func ( *UpdateMessagePoll) () ( PollResults) {
if == nil {
return
}
return .Results
}
type UpdateChatDefaultBannedRights struct {
Peer PeerClass
DefaultBannedRights ChatBannedRights
Version int
}
const UpdateChatDefaultBannedRightsTypeID = 0x54c01850
func ( UpdateChatDefaultBannedRights) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChatDefaultBannedRights{}
_ bin.Decoder = &UpdateChatDefaultBannedRights{}
_ bin.BareEncoder = &UpdateChatDefaultBannedRights{}
_ bin.BareDecoder = &UpdateChatDefaultBannedRights{}
_ UpdateClass = &UpdateChatDefaultBannedRights{}
)
func ( *UpdateChatDefaultBannedRights) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.DefaultBannedRights.Zero()) {
return false
}
if !(.Version == 0) {
return false
}
return true
}
func ( *UpdateChatDefaultBannedRights) () string {
if == nil {
return "UpdateChatDefaultBannedRights(nil)"
}
type UpdateChatDefaultBannedRights
return fmt.Sprintf("UpdateChatDefaultBannedRights%+v", (*))
}
func ( *UpdateChatDefaultBannedRights) ( interface {
() ( PeerClass)
() ( ChatBannedRights)
() ( int)
}) {
.Peer = .()
.DefaultBannedRights = .()
.Version = .()
}
func (*UpdateChatDefaultBannedRights) () uint32 {
return UpdateChatDefaultBannedRightsTypeID
}
func (*UpdateChatDefaultBannedRights) () string {
return "updateChatDefaultBannedRights"
}
func ( *UpdateChatDefaultBannedRights) () tdp.Type {
:= tdp.Type{
Name: "updateChatDefaultBannedRights",
ID: UpdateChatDefaultBannedRightsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "DefaultBannedRights",
SchemaName: "default_banned_rights",
},
{
Name: "Version",
SchemaName: "version",
},
}
return
}
func ( *UpdateChatDefaultBannedRights) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatDefaultBannedRights#54c01850 as nil")
}
.PutID(UpdateChatDefaultBannedRightsTypeID)
return .EncodeBare()
}
func ( *UpdateChatDefaultBannedRights) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatDefaultBannedRights#54c01850 as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateChatDefaultBannedRights#54c01850: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateChatDefaultBannedRights#54c01850: field peer: %w", )
}
if := .DefaultBannedRights.Encode(); != nil {
return fmt.Errorf("unable to encode updateChatDefaultBannedRights#54c01850: field default_banned_rights: %w", )
}
.PutInt(.Version)
return nil
}
func ( *UpdateChatDefaultBannedRights) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatDefaultBannedRights#54c01850 to nil")
}
if := .ConsumeID(UpdateChatDefaultBannedRightsTypeID); != nil {
return fmt.Errorf("unable to decode updateChatDefaultBannedRights#54c01850: %w", )
}
return .DecodeBare()
}
func ( *UpdateChatDefaultBannedRights) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatDefaultBannedRights#54c01850 to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateChatDefaultBannedRights#54c01850: field peer: %w", )
}
.Peer =
}
{
if := .DefaultBannedRights.Decode(); != nil {
return fmt.Errorf("unable to decode updateChatDefaultBannedRights#54c01850: field default_banned_rights: %w", )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChatDefaultBannedRights#54c01850: field version: %w", )
}
.Version =
}
return nil
}
func ( *UpdateChatDefaultBannedRights) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateChatDefaultBannedRights) () ( ChatBannedRights) {
if == nil {
return
}
return .DefaultBannedRights
}
func ( *UpdateChatDefaultBannedRights) () ( int) {
if == nil {
return
}
return .Version
}
type UpdateFolderPeers struct {
FolderPeers []FolderPeer
Pts int
PtsCount int
}
const UpdateFolderPeersTypeID = 0x19360dc0
func ( UpdateFolderPeers) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateFolderPeers{}
_ bin.Decoder = &UpdateFolderPeers{}
_ bin.BareEncoder = &UpdateFolderPeers{}
_ bin.BareDecoder = &UpdateFolderPeers{}
_ UpdateClass = &UpdateFolderPeers{}
)
func ( *UpdateFolderPeers) () bool {
if == nil {
return true
}
if !(.FolderPeers == nil) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdateFolderPeers) () string {
if == nil {
return "UpdateFolderPeers(nil)"
}
type UpdateFolderPeers
return fmt.Sprintf("UpdateFolderPeers%+v", (*))
}
func ( *UpdateFolderPeers) ( interface {
() ( []FolderPeer)
() ( int)
() ( int)
}) {
.FolderPeers = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdateFolderPeers) () uint32 {
return UpdateFolderPeersTypeID
}
func (*UpdateFolderPeers) () string {
return "updateFolderPeers"
}
func ( *UpdateFolderPeers) () tdp.Type {
:= tdp.Type{
Name: "updateFolderPeers",
ID: UpdateFolderPeersTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "FolderPeers",
SchemaName: "folder_peers",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdateFolderPeers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateFolderPeers#19360dc0 as nil")
}
.PutID(UpdateFolderPeersTypeID)
return .EncodeBare()
}
func ( *UpdateFolderPeers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateFolderPeers#19360dc0 as nil")
}
.PutVectorHeader(len(.FolderPeers))
for , := range .FolderPeers {
if := .Encode(); != nil {
return fmt.Errorf("unable to encode updateFolderPeers#19360dc0: field folder_peers element with index %d: %w", , )
}
}
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdateFolderPeers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateFolderPeers#19360dc0 to nil")
}
if := .ConsumeID(UpdateFolderPeersTypeID); != nil {
return fmt.Errorf("unable to decode updateFolderPeers#19360dc0: %w", )
}
return .DecodeBare()
}
func ( *UpdateFolderPeers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateFolderPeers#19360dc0 to nil")
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateFolderPeers#19360dc0: field folder_peers: %w", )
}
if > 0 {
.FolderPeers = make([]FolderPeer, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
var FolderPeer
if := .Decode(); != nil {
return fmt.Errorf("unable to decode updateFolderPeers#19360dc0: field folder_peers: %w", )
}
.FolderPeers = append(.FolderPeers, )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateFolderPeers#19360dc0: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateFolderPeers#19360dc0: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdateFolderPeers) () ( []FolderPeer) {
if == nil {
return
}
return .FolderPeers
}
func ( *UpdateFolderPeers) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdateFolderPeers) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdatePeerSettings struct {
Peer PeerClass
Settings PeerSettings
}
const UpdatePeerSettingsTypeID = 0x6a7e7366
func ( UpdatePeerSettings) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePeerSettings{}
_ bin.Decoder = &UpdatePeerSettings{}
_ bin.BareEncoder = &UpdatePeerSettings{}
_ bin.BareDecoder = &UpdatePeerSettings{}
_ UpdateClass = &UpdatePeerSettings{}
)
func ( *UpdatePeerSettings) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.Settings.Zero()) {
return false
}
return true
}
func ( *UpdatePeerSettings) () string {
if == nil {
return "UpdatePeerSettings(nil)"
}
type UpdatePeerSettings
return fmt.Sprintf("UpdatePeerSettings%+v", (*))
}
func ( *UpdatePeerSettings) ( interface {
() ( PeerClass)
() ( PeerSettings)
}) {
.Peer = .()
.Settings = .()
}
func (*UpdatePeerSettings) () uint32 {
return UpdatePeerSettingsTypeID
}
func (*UpdatePeerSettings) () string {
return "updatePeerSettings"
}
func ( *UpdatePeerSettings) () tdp.Type {
:= tdp.Type{
Name: "updatePeerSettings",
ID: UpdatePeerSettingsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "Settings",
SchemaName: "settings",
},
}
return
}
func ( *UpdatePeerSettings) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePeerSettings#6a7e7366 as nil")
}
.PutID(UpdatePeerSettingsTypeID)
return .EncodeBare()
}
func ( *UpdatePeerSettings) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePeerSettings#6a7e7366 as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updatePeerSettings#6a7e7366: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updatePeerSettings#6a7e7366: field peer: %w", )
}
if := .Settings.Encode(); != nil {
return fmt.Errorf("unable to encode updatePeerSettings#6a7e7366: field settings: %w", )
}
return nil
}
func ( *UpdatePeerSettings) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePeerSettings#6a7e7366 to nil")
}
if := .ConsumeID(UpdatePeerSettingsTypeID); != nil {
return fmt.Errorf("unable to decode updatePeerSettings#6a7e7366: %w", )
}
return .DecodeBare()
}
func ( *UpdatePeerSettings) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePeerSettings#6a7e7366 to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updatePeerSettings#6a7e7366: field peer: %w", )
}
.Peer =
}
{
if := .Settings.Decode(); != nil {
return fmt.Errorf("unable to decode updatePeerSettings#6a7e7366: field settings: %w", )
}
}
return nil
}
func ( *UpdatePeerSettings) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdatePeerSettings) () ( PeerSettings) {
if == nil {
return
}
return .Settings
}
type UpdatePeerLocated struct {
Peers []PeerLocatedClass
}
const UpdatePeerLocatedTypeID = 0xb4afcfb0
func ( UpdatePeerLocated) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePeerLocated{}
_ bin.Decoder = &UpdatePeerLocated{}
_ bin.BareEncoder = &UpdatePeerLocated{}
_ bin.BareDecoder = &UpdatePeerLocated{}
_ UpdateClass = &UpdatePeerLocated{}
)
func ( *UpdatePeerLocated) () bool {
if == nil {
return true
}
if !(.Peers == nil) {
return false
}
return true
}
func ( *UpdatePeerLocated) () string {
if == nil {
return "UpdatePeerLocated(nil)"
}
type UpdatePeerLocated
return fmt.Sprintf("UpdatePeerLocated%+v", (*))
}
func ( *UpdatePeerLocated) ( interface {
() ( []PeerLocatedClass)
}) {
.Peers = .()
}
func (*UpdatePeerLocated) () uint32 {
return UpdatePeerLocatedTypeID
}
func (*UpdatePeerLocated) () string {
return "updatePeerLocated"
}
func ( *UpdatePeerLocated) () tdp.Type {
:= tdp.Type{
Name: "updatePeerLocated",
ID: UpdatePeerLocatedTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peers",
SchemaName: "peers",
},
}
return
}
func ( *UpdatePeerLocated) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePeerLocated#b4afcfb0 as nil")
}
.PutID(UpdatePeerLocatedTypeID)
return .EncodeBare()
}
func ( *UpdatePeerLocated) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePeerLocated#b4afcfb0 as nil")
}
.PutVectorHeader(len(.Peers))
for , := range .Peers {
if == nil {
return fmt.Errorf("unable to encode updatePeerLocated#b4afcfb0: field peers element with index %d is nil", )
}
if := .Encode(); != nil {
return fmt.Errorf("unable to encode updatePeerLocated#b4afcfb0: field peers element with index %d: %w", , )
}
}
return nil
}
func ( *UpdatePeerLocated) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePeerLocated#b4afcfb0 to nil")
}
if := .ConsumeID(UpdatePeerLocatedTypeID); != nil {
return fmt.Errorf("unable to decode updatePeerLocated#b4afcfb0: %w", )
}
return .DecodeBare()
}
func ( *UpdatePeerLocated) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePeerLocated#b4afcfb0 to nil")
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updatePeerLocated#b4afcfb0: field peers: %w", )
}
if > 0 {
.Peers = make([]PeerLocatedClass, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := DecodePeerLocated()
if != nil {
return fmt.Errorf("unable to decode updatePeerLocated#b4afcfb0: field peers: %w", )
}
.Peers = append(.Peers, )
}
}
return nil
}
func ( *UpdatePeerLocated) () ( []PeerLocatedClass) {
if == nil {
return
}
return .Peers
}
func ( *UpdatePeerLocated) () ( PeerLocatedClassArray) {
return PeerLocatedClassArray(.Peers)
}
type UpdateNewScheduledMessage struct {
Message MessageClass
}
const UpdateNewScheduledMessageTypeID = 0x39a51dfb
func ( UpdateNewScheduledMessage) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateNewScheduledMessage{}
_ bin.Decoder = &UpdateNewScheduledMessage{}
_ bin.BareEncoder = &UpdateNewScheduledMessage{}
_ bin.BareDecoder = &UpdateNewScheduledMessage{}
_ UpdateClass = &UpdateNewScheduledMessage{}
)
func ( *UpdateNewScheduledMessage) () bool {
if == nil {
return true
}
if !(.Message == nil) {
return false
}
return true
}
func ( *UpdateNewScheduledMessage) () string {
if == nil {
return "UpdateNewScheduledMessage(nil)"
}
type UpdateNewScheduledMessage
return fmt.Sprintf("UpdateNewScheduledMessage%+v", (*))
}
func ( *UpdateNewScheduledMessage) ( interface {
() ( MessageClass)
}) {
.Message = .()
}
func (*UpdateNewScheduledMessage) () uint32 {
return UpdateNewScheduledMessageTypeID
}
func (*UpdateNewScheduledMessage) () string {
return "updateNewScheduledMessage"
}
func ( *UpdateNewScheduledMessage) () tdp.Type {
:= tdp.Type{
Name: "updateNewScheduledMessage",
ID: UpdateNewScheduledMessageTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Message",
SchemaName: "message",
},
}
return
}
func ( *UpdateNewScheduledMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNewScheduledMessage#39a51dfb as nil")
}
.PutID(UpdateNewScheduledMessageTypeID)
return .EncodeBare()
}
func ( *UpdateNewScheduledMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateNewScheduledMessage#39a51dfb as nil")
}
if .Message == nil {
return fmt.Errorf("unable to encode updateNewScheduledMessage#39a51dfb: field message is nil")
}
if := .Message.Encode(); != nil {
return fmt.Errorf("unable to encode updateNewScheduledMessage#39a51dfb: field message: %w", )
}
return nil
}
func ( *UpdateNewScheduledMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNewScheduledMessage#39a51dfb to nil")
}
if := .ConsumeID(UpdateNewScheduledMessageTypeID); != nil {
return fmt.Errorf("unable to decode updateNewScheduledMessage#39a51dfb: %w", )
}
return .DecodeBare()
}
func ( *UpdateNewScheduledMessage) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateNewScheduledMessage#39a51dfb to nil")
}
{
, := DecodeMessage()
if != nil {
return fmt.Errorf("unable to decode updateNewScheduledMessage#39a51dfb: field message: %w", )
}
.Message =
}
return nil
}
func ( *UpdateNewScheduledMessage) () ( MessageClass) {
if == nil {
return
}
return .Message
}
type UpdateDeleteScheduledMessages struct {
Peer PeerClass
Messages []int
}
const UpdateDeleteScheduledMessagesTypeID = 0x90866cee
func ( UpdateDeleteScheduledMessages) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateDeleteScheduledMessages{}
_ bin.Decoder = &UpdateDeleteScheduledMessages{}
_ bin.BareEncoder = &UpdateDeleteScheduledMessages{}
_ bin.BareDecoder = &UpdateDeleteScheduledMessages{}
_ UpdateClass = &UpdateDeleteScheduledMessages{}
)
func ( *UpdateDeleteScheduledMessages) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.Messages == nil) {
return false
}
return true
}
func ( *UpdateDeleteScheduledMessages) () string {
if == nil {
return "UpdateDeleteScheduledMessages(nil)"
}
type UpdateDeleteScheduledMessages
return fmt.Sprintf("UpdateDeleteScheduledMessages%+v", (*))
}
func ( *UpdateDeleteScheduledMessages) ( interface {
() ( PeerClass)
() ( []int)
}) {
.Peer = .()
.Messages = .()
}
func (*UpdateDeleteScheduledMessages) () uint32 {
return UpdateDeleteScheduledMessagesTypeID
}
func (*UpdateDeleteScheduledMessages) () string {
return "updateDeleteScheduledMessages"
}
func ( *UpdateDeleteScheduledMessages) () tdp.Type {
:= tdp.Type{
Name: "updateDeleteScheduledMessages",
ID: UpdateDeleteScheduledMessagesTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "Messages",
SchemaName: "messages",
},
}
return
}
func ( *UpdateDeleteScheduledMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDeleteScheduledMessages#90866cee as nil")
}
.PutID(UpdateDeleteScheduledMessagesTypeID)
return .EncodeBare()
}
func ( *UpdateDeleteScheduledMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDeleteScheduledMessages#90866cee as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateDeleteScheduledMessages#90866cee: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateDeleteScheduledMessages#90866cee: field peer: %w", )
}
.PutVectorHeader(len(.Messages))
for , := range .Messages {
.PutInt()
}
return nil
}
func ( *UpdateDeleteScheduledMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDeleteScheduledMessages#90866cee to nil")
}
if := .ConsumeID(UpdateDeleteScheduledMessagesTypeID); != nil {
return fmt.Errorf("unable to decode updateDeleteScheduledMessages#90866cee: %w", )
}
return .DecodeBare()
}
func ( *UpdateDeleteScheduledMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDeleteScheduledMessages#90866cee to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateDeleteScheduledMessages#90866cee: field peer: %w", )
}
.Peer =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateDeleteScheduledMessages#90866cee: field messages: %w", )
}
if > 0 {
.Messages = make([]int, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateDeleteScheduledMessages#90866cee: field messages: %w", )
}
.Messages = append(.Messages, )
}
}
return nil
}
func ( *UpdateDeleteScheduledMessages) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateDeleteScheduledMessages) () ( []int) {
if == nil {
return
}
return .Messages
}
type UpdateTheme struct {
Theme Theme
}
const UpdateThemeTypeID = 0x8216fba3
func ( UpdateTheme) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateTheme{}
_ bin.Decoder = &UpdateTheme{}
_ bin.BareEncoder = &UpdateTheme{}
_ bin.BareDecoder = &UpdateTheme{}
_ UpdateClass = &UpdateTheme{}
)
func ( *UpdateTheme) () bool {
if == nil {
return true
}
if !(.Theme.Zero()) {
return false
}
return true
}
func ( *UpdateTheme) () string {
if == nil {
return "UpdateTheme(nil)"
}
type UpdateTheme
return fmt.Sprintf("UpdateTheme%+v", (*))
}
func ( *UpdateTheme) ( interface {
() ( Theme)
}) {
.Theme = .()
}
func (*UpdateTheme) () uint32 {
return UpdateThemeTypeID
}
func (*UpdateTheme) () string {
return "updateTheme"
}
func ( *UpdateTheme) () tdp.Type {
:= tdp.Type{
Name: "updateTheme",
ID: UpdateThemeTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Theme",
SchemaName: "theme",
},
}
return
}
func ( *UpdateTheme) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateTheme#8216fba3 as nil")
}
.PutID(UpdateThemeTypeID)
return .EncodeBare()
}
func ( *UpdateTheme) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateTheme#8216fba3 as nil")
}
if := .Theme.Encode(); != nil {
return fmt.Errorf("unable to encode updateTheme#8216fba3: field theme: %w", )
}
return nil
}
func ( *UpdateTheme) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateTheme#8216fba3 to nil")
}
if := .ConsumeID(UpdateThemeTypeID); != nil {
return fmt.Errorf("unable to decode updateTheme#8216fba3: %w", )
}
return .DecodeBare()
}
func ( *UpdateTheme) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateTheme#8216fba3 to nil")
}
{
if := .Theme.Decode(); != nil {
return fmt.Errorf("unable to decode updateTheme#8216fba3: field theme: %w", )
}
}
return nil
}
func ( *UpdateTheme) () ( Theme) {
if == nil {
return
}
return .Theme
}
type UpdateGeoLiveViewed struct {
Peer PeerClass
MsgID int
}
const UpdateGeoLiveViewedTypeID = 0x871fb939
func ( UpdateGeoLiveViewed) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateGeoLiveViewed{}
_ bin.Decoder = &UpdateGeoLiveViewed{}
_ bin.BareEncoder = &UpdateGeoLiveViewed{}
_ bin.BareDecoder = &UpdateGeoLiveViewed{}
_ UpdateClass = &UpdateGeoLiveViewed{}
)
func ( *UpdateGeoLiveViewed) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.MsgID == 0) {
return false
}
return true
}
func ( *UpdateGeoLiveViewed) () string {
if == nil {
return "UpdateGeoLiveViewed(nil)"
}
type UpdateGeoLiveViewed
return fmt.Sprintf("UpdateGeoLiveViewed%+v", (*))
}
func ( *UpdateGeoLiveViewed) ( interface {
() ( PeerClass)
() ( int)
}) {
.Peer = .()
.MsgID = .()
}
func (*UpdateGeoLiveViewed) () uint32 {
return UpdateGeoLiveViewedTypeID
}
func (*UpdateGeoLiveViewed) () string {
return "updateGeoLiveViewed"
}
func ( *UpdateGeoLiveViewed) () tdp.Type {
:= tdp.Type{
Name: "updateGeoLiveViewed",
ID: UpdateGeoLiveViewedTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "MsgID",
SchemaName: "msg_id",
},
}
return
}
func ( *UpdateGeoLiveViewed) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateGeoLiveViewed#871fb939 as nil")
}
.PutID(UpdateGeoLiveViewedTypeID)
return .EncodeBare()
}
func ( *UpdateGeoLiveViewed) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateGeoLiveViewed#871fb939 as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateGeoLiveViewed#871fb939: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateGeoLiveViewed#871fb939: field peer: %w", )
}
.PutInt(.MsgID)
return nil
}
func ( *UpdateGeoLiveViewed) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateGeoLiveViewed#871fb939 to nil")
}
if := .ConsumeID(UpdateGeoLiveViewedTypeID); != nil {
return fmt.Errorf("unable to decode updateGeoLiveViewed#871fb939: %w", )
}
return .DecodeBare()
}
func ( *UpdateGeoLiveViewed) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateGeoLiveViewed#871fb939 to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateGeoLiveViewed#871fb939: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateGeoLiveViewed#871fb939: field msg_id: %w", )
}
.MsgID =
}
return nil
}
func ( *UpdateGeoLiveViewed) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateGeoLiveViewed) () ( int) {
if == nil {
return
}
return .MsgID
}
type UpdateLoginToken struct {
}
const UpdateLoginTokenTypeID = 0x564fe691
func ( UpdateLoginToken) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateLoginToken{}
_ bin.Decoder = &UpdateLoginToken{}
_ bin.BareEncoder = &UpdateLoginToken{}
_ bin.BareDecoder = &UpdateLoginToken{}
_ UpdateClass = &UpdateLoginToken{}
)
func ( *UpdateLoginToken) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateLoginToken) () string {
if == nil {
return "UpdateLoginToken(nil)"
}
type UpdateLoginToken
return fmt.Sprintf("UpdateLoginToken%+v", (*))
}
func (*UpdateLoginToken) () uint32 {
return UpdateLoginTokenTypeID
}
func (*UpdateLoginToken) () string {
return "updateLoginToken"
}
func ( *UpdateLoginToken) () tdp.Type {
:= tdp.Type{
Name: "updateLoginToken",
ID: UpdateLoginTokenTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateLoginToken) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateLoginToken#564fe691 as nil")
}
.PutID(UpdateLoginTokenTypeID)
return .EncodeBare()
}
func ( *UpdateLoginToken) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateLoginToken#564fe691 as nil")
}
return nil
}
func ( *UpdateLoginToken) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateLoginToken#564fe691 to nil")
}
if := .ConsumeID(UpdateLoginTokenTypeID); != nil {
return fmt.Errorf("unable to decode updateLoginToken#564fe691: %w", )
}
return .DecodeBare()
}
func ( *UpdateLoginToken) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateLoginToken#564fe691 to nil")
}
return nil
}
type UpdateMessagePollVote struct {
PollID int64
Peer PeerClass
Options [][]byte
Qts int
}
const UpdateMessagePollVoteTypeID = 0x24f40e77
func ( UpdateMessagePollVote) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateMessagePollVote{}
_ bin.Decoder = &UpdateMessagePollVote{}
_ bin.BareEncoder = &UpdateMessagePollVote{}
_ bin.BareDecoder = &UpdateMessagePollVote{}
_ UpdateClass = &UpdateMessagePollVote{}
)
func ( *UpdateMessagePollVote) () bool {
if == nil {
return true
}
if !(.PollID == 0) {
return false
}
if !(.Peer == nil) {
return false
}
if !(.Options == nil) {
return false
}
if !(.Qts == 0) {
return false
}
return true
}
func ( *UpdateMessagePollVote) () string {
if == nil {
return "UpdateMessagePollVote(nil)"
}
type UpdateMessagePollVote
return fmt.Sprintf("UpdateMessagePollVote%+v", (*))
}
func ( *UpdateMessagePollVote) ( interface {
() ( int64)
() ( PeerClass)
() ( [][]byte)
() ( int)
}) {
.PollID = .()
.Peer = .()
.Options = .()
.Qts = .()
}
func (*UpdateMessagePollVote) () uint32 {
return UpdateMessagePollVoteTypeID
}
func (*UpdateMessagePollVote) () string {
return "updateMessagePollVote"
}
func ( *UpdateMessagePollVote) () tdp.Type {
:= tdp.Type{
Name: "updateMessagePollVote",
ID: UpdateMessagePollVoteTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "PollID",
SchemaName: "poll_id",
},
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "Options",
SchemaName: "options",
},
{
Name: "Qts",
SchemaName: "qts",
},
}
return
}
func ( *UpdateMessagePollVote) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateMessagePollVote#24f40e77 as nil")
}
.PutID(UpdateMessagePollVoteTypeID)
return .EncodeBare()
}
func ( *UpdateMessagePollVote) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateMessagePollVote#24f40e77 as nil")
}
.PutLong(.PollID)
if .Peer == nil {
return fmt.Errorf("unable to encode updateMessagePollVote#24f40e77: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateMessagePollVote#24f40e77: field peer: %w", )
}
.PutVectorHeader(len(.Options))
for , := range .Options {
.PutBytes()
}
.PutInt(.Qts)
return nil
}
func ( *UpdateMessagePollVote) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateMessagePollVote#24f40e77 to nil")
}
if := .ConsumeID(UpdateMessagePollVoteTypeID); != nil {
return fmt.Errorf("unable to decode updateMessagePollVote#24f40e77: %w", )
}
return .DecodeBare()
}
func ( *UpdateMessagePollVote) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateMessagePollVote#24f40e77 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateMessagePollVote#24f40e77: field poll_id: %w", )
}
.PollID =
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateMessagePollVote#24f40e77: field peer: %w", )
}
.Peer =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateMessagePollVote#24f40e77: field options: %w", )
}
if > 0 {
.Options = make([][]byte, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := .Bytes()
if != nil {
return fmt.Errorf("unable to decode updateMessagePollVote#24f40e77: field options: %w", )
}
.Options = append(.Options, )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateMessagePollVote#24f40e77: field qts: %w", )
}
.Qts =
}
return nil
}
func ( *UpdateMessagePollVote) () ( int64) {
if == nil {
return
}
return .PollID
}
func ( *UpdateMessagePollVote) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateMessagePollVote) () ( [][]byte) {
if == nil {
return
}
return .Options
}
func ( *UpdateMessagePollVote) () ( int) {
if == nil {
return
}
return .Qts
}
type UpdateDialogFilter struct {
Flags bin.Fields
ID int
Filter DialogFilterClass
}
const UpdateDialogFilterTypeID = 0x26ffde7d
func ( UpdateDialogFilter) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateDialogFilter{}
_ bin.Decoder = &UpdateDialogFilter{}
_ bin.BareEncoder = &UpdateDialogFilter{}
_ bin.BareDecoder = &UpdateDialogFilter{}
_ UpdateClass = &UpdateDialogFilter{}
)
func ( *UpdateDialogFilter) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.ID == 0) {
return false
}
if !(.Filter == nil) {
return false
}
return true
}
func ( *UpdateDialogFilter) () string {
if == nil {
return "UpdateDialogFilter(nil)"
}
type UpdateDialogFilter
return fmt.Sprintf("UpdateDialogFilter%+v", (*))
}
func ( *UpdateDialogFilter) ( interface {
() ( int)
() ( DialogFilterClass, bool)
}) {
.ID = .()
if , := .(); {
.Filter =
}
}
func (*UpdateDialogFilter) () uint32 {
return UpdateDialogFilterTypeID
}
func (*UpdateDialogFilter) () string {
return "updateDialogFilter"
}
func ( *UpdateDialogFilter) () tdp.Type {
:= tdp.Type{
Name: "updateDialogFilter",
ID: UpdateDialogFilterTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ID",
SchemaName: "id",
},
{
Name: "Filter",
SchemaName: "filter",
Null: !.Flags.Has(0),
},
}
return
}
func ( *UpdateDialogFilter) () {
if !(.Filter == nil) {
.Flags.Set(0)
}
}
func ( *UpdateDialogFilter) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDialogFilter#26ffde7d as nil")
}
.PutID(UpdateDialogFilterTypeID)
return .EncodeBare()
}
func ( *UpdateDialogFilter) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDialogFilter#26ffde7d as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateDialogFilter#26ffde7d: field flags: %w", )
}
.PutInt(.ID)
if .Flags.Has(0) {
if .Filter == nil {
return fmt.Errorf("unable to encode updateDialogFilter#26ffde7d: field filter is nil")
}
if := .Filter.Encode(); != nil {
return fmt.Errorf("unable to encode updateDialogFilter#26ffde7d: field filter: %w", )
}
}
return nil
}
func ( *UpdateDialogFilter) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDialogFilter#26ffde7d to nil")
}
if := .ConsumeID(UpdateDialogFilterTypeID); != nil {
return fmt.Errorf("unable to decode updateDialogFilter#26ffde7d: %w", )
}
return .DecodeBare()
}
func ( *UpdateDialogFilter) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDialogFilter#26ffde7d to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateDialogFilter#26ffde7d: field flags: %w", )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateDialogFilter#26ffde7d: field id: %w", )
}
.ID =
}
if .Flags.Has(0) {
, := DecodeDialogFilter()
if != nil {
return fmt.Errorf("unable to decode updateDialogFilter#26ffde7d: field filter: %w", )
}
.Filter =
}
return nil
}
func ( *UpdateDialogFilter) () ( int) {
if == nil {
return
}
return .ID
}
func ( *UpdateDialogFilter) ( DialogFilterClass) {
.Flags.Set(0)
.Filter =
}
func ( *UpdateDialogFilter) () ( DialogFilterClass, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Filter, true
}
type UpdateDialogFilterOrder struct {
Order []int
}
const UpdateDialogFilterOrderTypeID = 0xa5d72105
func ( UpdateDialogFilterOrder) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateDialogFilterOrder{}
_ bin.Decoder = &UpdateDialogFilterOrder{}
_ bin.BareEncoder = &UpdateDialogFilterOrder{}
_ bin.BareDecoder = &UpdateDialogFilterOrder{}
_ UpdateClass = &UpdateDialogFilterOrder{}
)
func ( *UpdateDialogFilterOrder) () bool {
if == nil {
return true
}
if !(.Order == nil) {
return false
}
return true
}
func ( *UpdateDialogFilterOrder) () string {
if == nil {
return "UpdateDialogFilterOrder(nil)"
}
type UpdateDialogFilterOrder
return fmt.Sprintf("UpdateDialogFilterOrder%+v", (*))
}
func ( *UpdateDialogFilterOrder) ( interface {
() ( []int)
}) {
.Order = .()
}
func (*UpdateDialogFilterOrder) () uint32 {
return UpdateDialogFilterOrderTypeID
}
func (*UpdateDialogFilterOrder) () string {
return "updateDialogFilterOrder"
}
func ( *UpdateDialogFilterOrder) () tdp.Type {
:= tdp.Type{
Name: "updateDialogFilterOrder",
ID: UpdateDialogFilterOrderTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Order",
SchemaName: "order",
},
}
return
}
func ( *UpdateDialogFilterOrder) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDialogFilterOrder#a5d72105 as nil")
}
.PutID(UpdateDialogFilterOrderTypeID)
return .EncodeBare()
}
func ( *UpdateDialogFilterOrder) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDialogFilterOrder#a5d72105 as nil")
}
.PutVectorHeader(len(.Order))
for , := range .Order {
.PutInt()
}
return nil
}
func ( *UpdateDialogFilterOrder) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDialogFilterOrder#a5d72105 to nil")
}
if := .ConsumeID(UpdateDialogFilterOrderTypeID); != nil {
return fmt.Errorf("unable to decode updateDialogFilterOrder#a5d72105: %w", )
}
return .DecodeBare()
}
func ( *UpdateDialogFilterOrder) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDialogFilterOrder#a5d72105 to nil")
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateDialogFilterOrder#a5d72105: field order: %w", )
}
if > 0 {
.Order = make([]int, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateDialogFilterOrder#a5d72105: field order: %w", )
}
.Order = append(.Order, )
}
}
return nil
}
func ( *UpdateDialogFilterOrder) () ( []int) {
if == nil {
return
}
return .Order
}
type UpdateDialogFilters struct {
}
const UpdateDialogFiltersTypeID = 0x3504914f
func ( UpdateDialogFilters) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateDialogFilters{}
_ bin.Decoder = &UpdateDialogFilters{}
_ bin.BareEncoder = &UpdateDialogFilters{}
_ bin.BareDecoder = &UpdateDialogFilters{}
_ UpdateClass = &UpdateDialogFilters{}
)
func ( *UpdateDialogFilters) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateDialogFilters) () string {
if == nil {
return "UpdateDialogFilters(nil)"
}
type UpdateDialogFilters
return fmt.Sprintf("UpdateDialogFilters%+v", (*))
}
func (*UpdateDialogFilters) () uint32 {
return UpdateDialogFiltersTypeID
}
func (*UpdateDialogFilters) () string {
return "updateDialogFilters"
}
func ( *UpdateDialogFilters) () tdp.Type {
:= tdp.Type{
Name: "updateDialogFilters",
ID: UpdateDialogFiltersTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateDialogFilters) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDialogFilters#3504914f as nil")
}
.PutID(UpdateDialogFiltersTypeID)
return .EncodeBare()
}
func ( *UpdateDialogFilters) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateDialogFilters#3504914f as nil")
}
return nil
}
func ( *UpdateDialogFilters) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDialogFilters#3504914f to nil")
}
if := .ConsumeID(UpdateDialogFiltersTypeID); != nil {
return fmt.Errorf("unable to decode updateDialogFilters#3504914f: %w", )
}
return .DecodeBare()
}
func ( *UpdateDialogFilters) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateDialogFilters#3504914f to nil")
}
return nil
}
type UpdatePhoneCallSignalingData struct {
PhoneCallID int64
Data []byte
}
const UpdatePhoneCallSignalingDataTypeID = 0x2661bf09
func ( UpdatePhoneCallSignalingData) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePhoneCallSignalingData{}
_ bin.Decoder = &UpdatePhoneCallSignalingData{}
_ bin.BareEncoder = &UpdatePhoneCallSignalingData{}
_ bin.BareDecoder = &UpdatePhoneCallSignalingData{}
_ UpdateClass = &UpdatePhoneCallSignalingData{}
)
func ( *UpdatePhoneCallSignalingData) () bool {
if == nil {
return true
}
if !(.PhoneCallID == 0) {
return false
}
if !(.Data == nil) {
return false
}
return true
}
func ( *UpdatePhoneCallSignalingData) () string {
if == nil {
return "UpdatePhoneCallSignalingData(nil)"
}
type UpdatePhoneCallSignalingData
return fmt.Sprintf("UpdatePhoneCallSignalingData%+v", (*))
}
func ( *UpdatePhoneCallSignalingData) ( interface {
() ( int64)
() ( []byte)
}) {
.PhoneCallID = .()
.Data = .()
}
func (*UpdatePhoneCallSignalingData) () uint32 {
return UpdatePhoneCallSignalingDataTypeID
}
func (*UpdatePhoneCallSignalingData) () string {
return "updatePhoneCallSignalingData"
}
func ( *UpdatePhoneCallSignalingData) () tdp.Type {
:= tdp.Type{
Name: "updatePhoneCallSignalingData",
ID: UpdatePhoneCallSignalingDataTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "PhoneCallID",
SchemaName: "phone_call_id",
},
{
Name: "Data",
SchemaName: "data",
},
}
return
}
func ( *UpdatePhoneCallSignalingData) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePhoneCallSignalingData#2661bf09 as nil")
}
.PutID(UpdatePhoneCallSignalingDataTypeID)
return .EncodeBare()
}
func ( *UpdatePhoneCallSignalingData) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePhoneCallSignalingData#2661bf09 as nil")
}
.PutLong(.PhoneCallID)
.PutBytes(.Data)
return nil
}
func ( *UpdatePhoneCallSignalingData) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePhoneCallSignalingData#2661bf09 to nil")
}
if := .ConsumeID(UpdatePhoneCallSignalingDataTypeID); != nil {
return fmt.Errorf("unable to decode updatePhoneCallSignalingData#2661bf09: %w", )
}
return .DecodeBare()
}
func ( *UpdatePhoneCallSignalingData) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePhoneCallSignalingData#2661bf09 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updatePhoneCallSignalingData#2661bf09: field phone_call_id: %w", )
}
.PhoneCallID =
}
{
, := .Bytes()
if != nil {
return fmt.Errorf("unable to decode updatePhoneCallSignalingData#2661bf09: field data: %w", )
}
.Data =
}
return nil
}
func ( *UpdatePhoneCallSignalingData) () ( int64) {
if == nil {
return
}
return .PhoneCallID
}
func ( *UpdatePhoneCallSignalingData) () ( []byte) {
if == nil {
return
}
return .Data
}
type UpdateChannelMessageForwards struct {
ChannelID int64
ID int
Forwards int
}
const UpdateChannelMessageForwardsTypeID = 0xd29a27f4
func ( UpdateChannelMessageForwards) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChannelMessageForwards{}
_ bin.Decoder = &UpdateChannelMessageForwards{}
_ bin.BareEncoder = &UpdateChannelMessageForwards{}
_ bin.BareDecoder = &UpdateChannelMessageForwards{}
_ UpdateClass = &UpdateChannelMessageForwards{}
)
func ( *UpdateChannelMessageForwards) () bool {
if == nil {
return true
}
if !(.ChannelID == 0) {
return false
}
if !(.ID == 0) {
return false
}
if !(.Forwards == 0) {
return false
}
return true
}
func ( *UpdateChannelMessageForwards) () string {
if == nil {
return "UpdateChannelMessageForwards(nil)"
}
type UpdateChannelMessageForwards
return fmt.Sprintf("UpdateChannelMessageForwards%+v", (*))
}
func ( *UpdateChannelMessageForwards) ( interface {
() ( int64)
() ( int)
() ( int)
}) {
.ChannelID = .()
.ID = .()
.Forwards = .()
}
func (*UpdateChannelMessageForwards) () uint32 {
return UpdateChannelMessageForwardsTypeID
}
func (*UpdateChannelMessageForwards) () string {
return "updateChannelMessageForwards"
}
func ( *UpdateChannelMessageForwards) () tdp.Type {
:= tdp.Type{
Name: "updateChannelMessageForwards",
ID: UpdateChannelMessageForwardsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "ID",
SchemaName: "id",
},
{
Name: "Forwards",
SchemaName: "forwards",
},
}
return
}
func ( *UpdateChannelMessageForwards) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelMessageForwards#d29a27f4 as nil")
}
.PutID(UpdateChannelMessageForwardsTypeID)
return .EncodeBare()
}
func ( *UpdateChannelMessageForwards) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelMessageForwards#d29a27f4 as nil")
}
.PutLong(.ChannelID)
.PutInt(.ID)
.PutInt(.Forwards)
return nil
}
func ( *UpdateChannelMessageForwards) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelMessageForwards#d29a27f4 to nil")
}
if := .ConsumeID(UpdateChannelMessageForwardsTypeID); != nil {
return fmt.Errorf("unable to decode updateChannelMessageForwards#d29a27f4: %w", )
}
return .DecodeBare()
}
func ( *UpdateChannelMessageForwards) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelMessageForwards#d29a27f4 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelMessageForwards#d29a27f4: field channel_id: %w", )
}
.ChannelID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelMessageForwards#d29a27f4: field id: %w", )
}
.ID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelMessageForwards#d29a27f4: field forwards: %w", )
}
.Forwards =
}
return nil
}
func ( *UpdateChannelMessageForwards) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateChannelMessageForwards) () ( int) {
if == nil {
return
}
return .ID
}
func ( *UpdateChannelMessageForwards) () ( int) {
if == nil {
return
}
return .Forwards
}
type UpdateReadChannelDiscussionInbox struct {
Flags bin.Fields
ChannelID int64
TopMsgID int
ReadMaxID int
BroadcastID int64
BroadcastPost int
}
const UpdateReadChannelDiscussionInboxTypeID = 0xd6b19546
func ( UpdateReadChannelDiscussionInbox) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateReadChannelDiscussionInbox{}
_ bin.Decoder = &UpdateReadChannelDiscussionInbox{}
_ bin.BareEncoder = &UpdateReadChannelDiscussionInbox{}
_ bin.BareDecoder = &UpdateReadChannelDiscussionInbox{}
_ UpdateClass = &UpdateReadChannelDiscussionInbox{}
)
func ( *UpdateReadChannelDiscussionInbox) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.ChannelID == 0) {
return false
}
if !(.TopMsgID == 0) {
return false
}
if !(.ReadMaxID == 0) {
return false
}
if !(.BroadcastID == 0) {
return false
}
if !(.BroadcastPost == 0) {
return false
}
return true
}
func ( *UpdateReadChannelDiscussionInbox) () string {
if == nil {
return "UpdateReadChannelDiscussionInbox(nil)"
}
type UpdateReadChannelDiscussionInbox
return fmt.Sprintf("UpdateReadChannelDiscussionInbox%+v", (*))
}
func ( *UpdateReadChannelDiscussionInbox) ( interface {
() ( int64)
() ( int)
() ( int)
() ( int64, bool)
() ( int, bool)
}) {
.ChannelID = .()
.TopMsgID = .()
.ReadMaxID = .()
if , := .(); {
.BroadcastID =
}
if , := .(); {
.BroadcastPost =
}
}
func (*UpdateReadChannelDiscussionInbox) () uint32 {
return UpdateReadChannelDiscussionInboxTypeID
}
func (*UpdateReadChannelDiscussionInbox) () string {
return "updateReadChannelDiscussionInbox"
}
func ( *UpdateReadChannelDiscussionInbox) () tdp.Type {
:= tdp.Type{
Name: "updateReadChannelDiscussionInbox",
ID: UpdateReadChannelDiscussionInboxTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "TopMsgID",
SchemaName: "top_msg_id",
},
{
Name: "ReadMaxID",
SchemaName: "read_max_id",
},
{
Name: "BroadcastID",
SchemaName: "broadcast_id",
Null: !.Flags.Has(0),
},
{
Name: "BroadcastPost",
SchemaName: "broadcast_post",
Null: !.Flags.Has(0),
},
}
return
}
func ( *UpdateReadChannelDiscussionInbox) () {
if !(.BroadcastID == 0) {
.Flags.Set(0)
}
if !(.BroadcastPost == 0) {
.Flags.Set(0)
}
}
func ( *UpdateReadChannelDiscussionInbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadChannelDiscussionInbox#d6b19546 as nil")
}
.PutID(UpdateReadChannelDiscussionInboxTypeID)
return .EncodeBare()
}
func ( *UpdateReadChannelDiscussionInbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadChannelDiscussionInbox#d6b19546 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateReadChannelDiscussionInbox#d6b19546: field flags: %w", )
}
.PutLong(.ChannelID)
.PutInt(.TopMsgID)
.PutInt(.ReadMaxID)
if .Flags.Has(0) {
.PutLong(.BroadcastID)
}
if .Flags.Has(0) {
.PutInt(.BroadcastPost)
}
return nil
}
func ( *UpdateReadChannelDiscussionInbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadChannelDiscussionInbox#d6b19546 to nil")
}
if := .ConsumeID(UpdateReadChannelDiscussionInboxTypeID); != nil {
return fmt.Errorf("unable to decode updateReadChannelDiscussionInbox#d6b19546: %w", )
}
return .DecodeBare()
}
func ( *UpdateReadChannelDiscussionInbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadChannelDiscussionInbox#d6b19546 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateReadChannelDiscussionInbox#d6b19546: field flags: %w", )
}
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelDiscussionInbox#d6b19546: field channel_id: %w", )
}
.ChannelID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelDiscussionInbox#d6b19546: field top_msg_id: %w", )
}
.TopMsgID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelDiscussionInbox#d6b19546: field read_max_id: %w", )
}
.ReadMaxID =
}
if .Flags.Has(0) {
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelDiscussionInbox#d6b19546: field broadcast_id: %w", )
}
.BroadcastID =
}
if .Flags.Has(0) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelDiscussionInbox#d6b19546: field broadcast_post: %w", )
}
.BroadcastPost =
}
return nil
}
func ( *UpdateReadChannelDiscussionInbox) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateReadChannelDiscussionInbox) () ( int) {
if == nil {
return
}
return .TopMsgID
}
func ( *UpdateReadChannelDiscussionInbox) () ( int) {
if == nil {
return
}
return .ReadMaxID
}
func ( *UpdateReadChannelDiscussionInbox) ( int64) {
.Flags.Set(0)
.BroadcastID =
}
func ( *UpdateReadChannelDiscussionInbox) () ( int64, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .BroadcastID, true
}
func ( *UpdateReadChannelDiscussionInbox) ( int) {
.Flags.Set(0)
.BroadcastPost =
}
func ( *UpdateReadChannelDiscussionInbox) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .BroadcastPost, true
}
type UpdateReadChannelDiscussionOutbox struct {
ChannelID int64
TopMsgID int
ReadMaxID int
}
const UpdateReadChannelDiscussionOutboxTypeID = 0x695c9e7c
func ( UpdateReadChannelDiscussionOutbox) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateReadChannelDiscussionOutbox{}
_ bin.Decoder = &UpdateReadChannelDiscussionOutbox{}
_ bin.BareEncoder = &UpdateReadChannelDiscussionOutbox{}
_ bin.BareDecoder = &UpdateReadChannelDiscussionOutbox{}
_ UpdateClass = &UpdateReadChannelDiscussionOutbox{}
)
func ( *UpdateReadChannelDiscussionOutbox) () bool {
if == nil {
return true
}
if !(.ChannelID == 0) {
return false
}
if !(.TopMsgID == 0) {
return false
}
if !(.ReadMaxID == 0) {
return false
}
return true
}
func ( *UpdateReadChannelDiscussionOutbox) () string {
if == nil {
return "UpdateReadChannelDiscussionOutbox(nil)"
}
type UpdateReadChannelDiscussionOutbox
return fmt.Sprintf("UpdateReadChannelDiscussionOutbox%+v", (*))
}
func ( *UpdateReadChannelDiscussionOutbox) ( interface {
() ( int64)
() ( int)
() ( int)
}) {
.ChannelID = .()
.TopMsgID = .()
.ReadMaxID = .()
}
func (*UpdateReadChannelDiscussionOutbox) () uint32 {
return UpdateReadChannelDiscussionOutboxTypeID
}
func (*UpdateReadChannelDiscussionOutbox) () string {
return "updateReadChannelDiscussionOutbox"
}
func ( *UpdateReadChannelDiscussionOutbox) () tdp.Type {
:= tdp.Type{
Name: "updateReadChannelDiscussionOutbox",
ID: UpdateReadChannelDiscussionOutboxTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "TopMsgID",
SchemaName: "top_msg_id",
},
{
Name: "ReadMaxID",
SchemaName: "read_max_id",
},
}
return
}
func ( *UpdateReadChannelDiscussionOutbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadChannelDiscussionOutbox#695c9e7c as nil")
}
.PutID(UpdateReadChannelDiscussionOutboxTypeID)
return .EncodeBare()
}
func ( *UpdateReadChannelDiscussionOutbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadChannelDiscussionOutbox#695c9e7c as nil")
}
.PutLong(.ChannelID)
.PutInt(.TopMsgID)
.PutInt(.ReadMaxID)
return nil
}
func ( *UpdateReadChannelDiscussionOutbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadChannelDiscussionOutbox#695c9e7c to nil")
}
if := .ConsumeID(UpdateReadChannelDiscussionOutboxTypeID); != nil {
return fmt.Errorf("unable to decode updateReadChannelDiscussionOutbox#695c9e7c: %w", )
}
return .DecodeBare()
}
func ( *UpdateReadChannelDiscussionOutbox) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadChannelDiscussionOutbox#695c9e7c to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelDiscussionOutbox#695c9e7c: field channel_id: %w", )
}
.ChannelID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelDiscussionOutbox#695c9e7c: field top_msg_id: %w", )
}
.TopMsgID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadChannelDiscussionOutbox#695c9e7c: field read_max_id: %w", )
}
.ReadMaxID =
}
return nil
}
func ( *UpdateReadChannelDiscussionOutbox) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateReadChannelDiscussionOutbox) () ( int) {
if == nil {
return
}
return .TopMsgID
}
func ( *UpdateReadChannelDiscussionOutbox) () ( int) {
if == nil {
return
}
return .ReadMaxID
}
type UpdatePeerBlocked struct {
Flags bin.Fields
Blocked bool
BlockedMyStoriesFrom bool
PeerID PeerClass
}
const UpdatePeerBlockedTypeID = 0xebe07752
func ( UpdatePeerBlocked) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePeerBlocked{}
_ bin.Decoder = &UpdatePeerBlocked{}
_ bin.BareEncoder = &UpdatePeerBlocked{}
_ bin.BareDecoder = &UpdatePeerBlocked{}
_ UpdateClass = &UpdatePeerBlocked{}
)
func ( *UpdatePeerBlocked) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Blocked == false) {
return false
}
if !(.BlockedMyStoriesFrom == false) {
return false
}
if !(.PeerID == nil) {
return false
}
return true
}
func ( *UpdatePeerBlocked) () string {
if == nil {
return "UpdatePeerBlocked(nil)"
}
type UpdatePeerBlocked
return fmt.Sprintf("UpdatePeerBlocked%+v", (*))
}
func ( *UpdatePeerBlocked) ( interface {
() ( bool)
() ( bool)
() ( PeerClass)
}) {
.Blocked = .()
.BlockedMyStoriesFrom = .()
.PeerID = .()
}
func (*UpdatePeerBlocked) () uint32 {
return UpdatePeerBlockedTypeID
}
func (*UpdatePeerBlocked) () string {
return "updatePeerBlocked"
}
func ( *UpdatePeerBlocked) () tdp.Type {
:= tdp.Type{
Name: "updatePeerBlocked",
ID: UpdatePeerBlockedTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Blocked",
SchemaName: "blocked",
Null: !.Flags.Has(0),
},
{
Name: "BlockedMyStoriesFrom",
SchemaName: "blocked_my_stories_from",
Null: !.Flags.Has(1),
},
{
Name: "PeerID",
SchemaName: "peer_id",
},
}
return
}
func ( *UpdatePeerBlocked) () {
if !(.Blocked == false) {
.Flags.Set(0)
}
if !(.BlockedMyStoriesFrom == false) {
.Flags.Set(1)
}
}
func ( *UpdatePeerBlocked) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePeerBlocked#ebe07752 as nil")
}
.PutID(UpdatePeerBlockedTypeID)
return .EncodeBare()
}
func ( *UpdatePeerBlocked) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePeerBlocked#ebe07752 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updatePeerBlocked#ebe07752: field flags: %w", )
}
if .PeerID == nil {
return fmt.Errorf("unable to encode updatePeerBlocked#ebe07752: field peer_id is nil")
}
if := .PeerID.Encode(); != nil {
return fmt.Errorf("unable to encode updatePeerBlocked#ebe07752: field peer_id: %w", )
}
return nil
}
func ( *UpdatePeerBlocked) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePeerBlocked#ebe07752 to nil")
}
if := .ConsumeID(UpdatePeerBlockedTypeID); != nil {
return fmt.Errorf("unable to decode updatePeerBlocked#ebe07752: %w", )
}
return .DecodeBare()
}
func ( *UpdatePeerBlocked) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePeerBlocked#ebe07752 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updatePeerBlocked#ebe07752: field flags: %w", )
}
}
.Blocked = .Flags.Has(0)
.BlockedMyStoriesFrom = .Flags.Has(1)
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updatePeerBlocked#ebe07752: field peer_id: %w", )
}
.PeerID =
}
return nil
}
func ( *UpdatePeerBlocked) ( bool) {
if {
.Flags.Set(0)
.Blocked = true
} else {
.Flags.Unset(0)
.Blocked = false
}
}
func ( *UpdatePeerBlocked) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdatePeerBlocked) ( bool) {
if {
.Flags.Set(1)
.BlockedMyStoriesFrom = true
} else {
.Flags.Unset(1)
.BlockedMyStoriesFrom = false
}
}
func ( *UpdatePeerBlocked) () ( bool) {
if == nil {
return
}
return .Flags.Has(1)
}
func ( *UpdatePeerBlocked) () ( PeerClass) {
if == nil {
return
}
return .PeerID
}
type UpdateChannelUserTyping struct {
Flags bin.Fields
ChannelID int64
TopMsgID int
FromID PeerClass
Action SendMessageActionClass
}
const UpdateChannelUserTypingTypeID = 0x8c88c923
func ( UpdateChannelUserTyping) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChannelUserTyping{}
_ bin.Decoder = &UpdateChannelUserTyping{}
_ bin.BareEncoder = &UpdateChannelUserTyping{}
_ bin.BareDecoder = &UpdateChannelUserTyping{}
_ UpdateClass = &UpdateChannelUserTyping{}
)
func ( *UpdateChannelUserTyping) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.ChannelID == 0) {
return false
}
if !(.TopMsgID == 0) {
return false
}
if !(.FromID == nil) {
return false
}
if !(.Action == nil) {
return false
}
return true
}
func ( *UpdateChannelUserTyping) () string {
if == nil {
return "UpdateChannelUserTyping(nil)"
}
type UpdateChannelUserTyping
return fmt.Sprintf("UpdateChannelUserTyping%+v", (*))
}
func ( *UpdateChannelUserTyping) ( interface {
() ( int64)
() ( int, bool)
() ( PeerClass)
() ( SendMessageActionClass)
}) {
.ChannelID = .()
if , := .(); {
.TopMsgID =
}
.FromID = .()
.Action = .()
}
func (*UpdateChannelUserTyping) () uint32 {
return UpdateChannelUserTypingTypeID
}
func (*UpdateChannelUserTyping) () string {
return "updateChannelUserTyping"
}
func ( *UpdateChannelUserTyping) () tdp.Type {
:= tdp.Type{
Name: "updateChannelUserTyping",
ID: UpdateChannelUserTypingTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "TopMsgID",
SchemaName: "top_msg_id",
Null: !.Flags.Has(0),
},
{
Name: "FromID",
SchemaName: "from_id",
},
{
Name: "Action",
SchemaName: "action",
},
}
return
}
func ( *UpdateChannelUserTyping) () {
if !(.TopMsgID == 0) {
.Flags.Set(0)
}
}
func ( *UpdateChannelUserTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelUserTyping#8c88c923 as nil")
}
.PutID(UpdateChannelUserTypingTypeID)
return .EncodeBare()
}
func ( *UpdateChannelUserTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelUserTyping#8c88c923 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateChannelUserTyping#8c88c923: field flags: %w", )
}
.PutLong(.ChannelID)
if .Flags.Has(0) {
.PutInt(.TopMsgID)
}
if .FromID == nil {
return fmt.Errorf("unable to encode updateChannelUserTyping#8c88c923: field from_id is nil")
}
if := .FromID.Encode(); != nil {
return fmt.Errorf("unable to encode updateChannelUserTyping#8c88c923: field from_id: %w", )
}
if .Action == nil {
return fmt.Errorf("unable to encode updateChannelUserTyping#8c88c923: field action is nil")
}
if := .Action.Encode(); != nil {
return fmt.Errorf("unable to encode updateChannelUserTyping#8c88c923: field action: %w", )
}
return nil
}
func ( *UpdateChannelUserTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelUserTyping#8c88c923 to nil")
}
if := .ConsumeID(UpdateChannelUserTypingTypeID); != nil {
return fmt.Errorf("unable to decode updateChannelUserTyping#8c88c923: %w", )
}
return .DecodeBare()
}
func ( *UpdateChannelUserTyping) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelUserTyping#8c88c923 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateChannelUserTyping#8c88c923: field flags: %w", )
}
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelUserTyping#8c88c923: field channel_id: %w", )
}
.ChannelID =
}
if .Flags.Has(0) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelUserTyping#8c88c923: field top_msg_id: %w", )
}
.TopMsgID =
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateChannelUserTyping#8c88c923: field from_id: %w", )
}
.FromID =
}
{
, := DecodeSendMessageAction()
if != nil {
return fmt.Errorf("unable to decode updateChannelUserTyping#8c88c923: field action: %w", )
}
.Action =
}
return nil
}
func ( *UpdateChannelUserTyping) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateChannelUserTyping) ( int) {
.Flags.Set(0)
.TopMsgID =
}
func ( *UpdateChannelUserTyping) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .TopMsgID, true
}
func ( *UpdateChannelUserTyping) () ( PeerClass) {
if == nil {
return
}
return .FromID
}
func ( *UpdateChannelUserTyping) () ( SendMessageActionClass) {
if == nil {
return
}
return .Action
}
type UpdatePinnedMessages struct {
Flags bin.Fields
Pinned bool
Peer PeerClass
Messages []int
Pts int
PtsCount int
}
const UpdatePinnedMessagesTypeID = 0xed85eab5
func ( UpdatePinnedMessages) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePinnedMessages{}
_ bin.Decoder = &UpdatePinnedMessages{}
_ bin.BareEncoder = &UpdatePinnedMessages{}
_ bin.BareDecoder = &UpdatePinnedMessages{}
_ UpdateClass = &UpdatePinnedMessages{}
)
func ( *UpdatePinnedMessages) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Pinned == false) {
return false
}
if !(.Peer == nil) {
return false
}
if !(.Messages == nil) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdatePinnedMessages) () string {
if == nil {
return "UpdatePinnedMessages(nil)"
}
type UpdatePinnedMessages
return fmt.Sprintf("UpdatePinnedMessages%+v", (*))
}
func ( *UpdatePinnedMessages) ( interface {
() ( bool)
() ( PeerClass)
() ( []int)
() ( int)
() ( int)
}) {
.Pinned = .()
.Peer = .()
.Messages = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdatePinnedMessages) () uint32 {
return UpdatePinnedMessagesTypeID
}
func (*UpdatePinnedMessages) () string {
return "updatePinnedMessages"
}
func ( *UpdatePinnedMessages) () tdp.Type {
:= tdp.Type{
Name: "updatePinnedMessages",
ID: UpdatePinnedMessagesTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Pinned",
SchemaName: "pinned",
Null: !.Flags.Has(0),
},
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "Messages",
SchemaName: "messages",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdatePinnedMessages) () {
if !(.Pinned == false) {
.Flags.Set(0)
}
}
func ( *UpdatePinnedMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePinnedMessages#ed85eab5 as nil")
}
.PutID(UpdatePinnedMessagesTypeID)
return .EncodeBare()
}
func ( *UpdatePinnedMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePinnedMessages#ed85eab5 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updatePinnedMessages#ed85eab5: field flags: %w", )
}
if .Peer == nil {
return fmt.Errorf("unable to encode updatePinnedMessages#ed85eab5: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updatePinnedMessages#ed85eab5: field peer: %w", )
}
.PutVectorHeader(len(.Messages))
for , := range .Messages {
.PutInt()
}
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdatePinnedMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePinnedMessages#ed85eab5 to nil")
}
if := .ConsumeID(UpdatePinnedMessagesTypeID); != nil {
return fmt.Errorf("unable to decode updatePinnedMessages#ed85eab5: %w", )
}
return .DecodeBare()
}
func ( *UpdatePinnedMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePinnedMessages#ed85eab5 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updatePinnedMessages#ed85eab5: field flags: %w", )
}
}
.Pinned = .Flags.Has(0)
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updatePinnedMessages#ed85eab5: field peer: %w", )
}
.Peer =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updatePinnedMessages#ed85eab5: field messages: %w", )
}
if > 0 {
.Messages = make([]int, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updatePinnedMessages#ed85eab5: field messages: %w", )
}
.Messages = append(.Messages, )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updatePinnedMessages#ed85eab5: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updatePinnedMessages#ed85eab5: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdatePinnedMessages) ( bool) {
if {
.Flags.Set(0)
.Pinned = true
} else {
.Flags.Unset(0)
.Pinned = false
}
}
func ( *UpdatePinnedMessages) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdatePinnedMessages) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdatePinnedMessages) () ( []int) {
if == nil {
return
}
return .Messages
}
func ( *UpdatePinnedMessages) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdatePinnedMessages) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdatePinnedChannelMessages struct {
Flags bin.Fields
Pinned bool
ChannelID int64
Messages []int
Pts int
PtsCount int
}
const UpdatePinnedChannelMessagesTypeID = 0x5bb98608
func ( UpdatePinnedChannelMessages) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePinnedChannelMessages{}
_ bin.Decoder = &UpdatePinnedChannelMessages{}
_ bin.BareEncoder = &UpdatePinnedChannelMessages{}
_ bin.BareDecoder = &UpdatePinnedChannelMessages{}
_ UpdateClass = &UpdatePinnedChannelMessages{}
)
func ( *UpdatePinnedChannelMessages) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Pinned == false) {
return false
}
if !(.ChannelID == 0) {
return false
}
if !(.Messages == nil) {
return false
}
if !(.Pts == 0) {
return false
}
if !(.PtsCount == 0) {
return false
}
return true
}
func ( *UpdatePinnedChannelMessages) () string {
if == nil {
return "UpdatePinnedChannelMessages(nil)"
}
type UpdatePinnedChannelMessages
return fmt.Sprintf("UpdatePinnedChannelMessages%+v", (*))
}
func ( *UpdatePinnedChannelMessages) ( interface {
() ( bool)
() ( int64)
() ( []int)
() ( int)
() ( int)
}) {
.Pinned = .()
.ChannelID = .()
.Messages = .()
.Pts = .()
.PtsCount = .()
}
func (*UpdatePinnedChannelMessages) () uint32 {
return UpdatePinnedChannelMessagesTypeID
}
func (*UpdatePinnedChannelMessages) () string {
return "updatePinnedChannelMessages"
}
func ( *UpdatePinnedChannelMessages) () tdp.Type {
:= tdp.Type{
Name: "updatePinnedChannelMessages",
ID: UpdatePinnedChannelMessagesTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Pinned",
SchemaName: "pinned",
Null: !.Flags.Has(0),
},
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "Messages",
SchemaName: "messages",
},
{
Name: "Pts",
SchemaName: "pts",
},
{
Name: "PtsCount",
SchemaName: "pts_count",
},
}
return
}
func ( *UpdatePinnedChannelMessages) () {
if !(.Pinned == false) {
.Flags.Set(0)
}
}
func ( *UpdatePinnedChannelMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePinnedChannelMessages#5bb98608 as nil")
}
.PutID(UpdatePinnedChannelMessagesTypeID)
return .EncodeBare()
}
func ( *UpdatePinnedChannelMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePinnedChannelMessages#5bb98608 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updatePinnedChannelMessages#5bb98608: field flags: %w", )
}
.PutLong(.ChannelID)
.PutVectorHeader(len(.Messages))
for , := range .Messages {
.PutInt()
}
.PutInt(.Pts)
.PutInt(.PtsCount)
return nil
}
func ( *UpdatePinnedChannelMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePinnedChannelMessages#5bb98608 to nil")
}
if := .ConsumeID(UpdatePinnedChannelMessagesTypeID); != nil {
return fmt.Errorf("unable to decode updatePinnedChannelMessages#5bb98608: %w", )
}
return .DecodeBare()
}
func ( *UpdatePinnedChannelMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePinnedChannelMessages#5bb98608 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updatePinnedChannelMessages#5bb98608: field flags: %w", )
}
}
.Pinned = .Flags.Has(0)
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updatePinnedChannelMessages#5bb98608: field channel_id: %w", )
}
.ChannelID =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updatePinnedChannelMessages#5bb98608: field messages: %w", )
}
if > 0 {
.Messages = make([]int, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updatePinnedChannelMessages#5bb98608: field messages: %w", )
}
.Messages = append(.Messages, )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updatePinnedChannelMessages#5bb98608: field pts: %w", )
}
.Pts =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updatePinnedChannelMessages#5bb98608: field pts_count: %w", )
}
.PtsCount =
}
return nil
}
func ( *UpdatePinnedChannelMessages) ( bool) {
if {
.Flags.Set(0)
.Pinned = true
} else {
.Flags.Unset(0)
.Pinned = false
}
}
func ( *UpdatePinnedChannelMessages) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdatePinnedChannelMessages) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdatePinnedChannelMessages) () ( []int) {
if == nil {
return
}
return .Messages
}
func ( *UpdatePinnedChannelMessages) () ( int) {
if == nil {
return
}
return .Pts
}
func ( *UpdatePinnedChannelMessages) () ( int) {
if == nil {
return
}
return .PtsCount
}
type UpdateChat struct {
ChatID int64
}
const UpdateChatTypeID = 0xf89a6a4e
func ( UpdateChat) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChat{}
_ bin.Decoder = &UpdateChat{}
_ bin.BareEncoder = &UpdateChat{}
_ bin.BareDecoder = &UpdateChat{}
_ UpdateClass = &UpdateChat{}
)
func ( *UpdateChat) () bool {
if == nil {
return true
}
if !(.ChatID == 0) {
return false
}
return true
}
func ( *UpdateChat) () string {
if == nil {
return "UpdateChat(nil)"
}
type UpdateChat
return fmt.Sprintf("UpdateChat%+v", (*))
}
func ( *UpdateChat) ( interface {
() ( int64)
}) {
.ChatID = .()
}
func (*UpdateChat) () uint32 {
return UpdateChatTypeID
}
func (*UpdateChat) () string {
return "updateChat"
}
func ( *UpdateChat) () tdp.Type {
:= tdp.Type{
Name: "updateChat",
ID: UpdateChatTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChatID",
SchemaName: "chat_id",
},
}
return
}
func ( *UpdateChat) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChat#f89a6a4e as nil")
}
.PutID(UpdateChatTypeID)
return .EncodeBare()
}
func ( *UpdateChat) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChat#f89a6a4e as nil")
}
.PutLong(.ChatID)
return nil
}
func ( *UpdateChat) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChat#f89a6a4e to nil")
}
if := .ConsumeID(UpdateChatTypeID); != nil {
return fmt.Errorf("unable to decode updateChat#f89a6a4e: %w", )
}
return .DecodeBare()
}
func ( *UpdateChat) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChat#f89a6a4e to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChat#f89a6a4e: field chat_id: %w", )
}
.ChatID =
}
return nil
}
func ( *UpdateChat) () ( int64) {
if == nil {
return
}
return .ChatID
}
type UpdateGroupCallParticipants struct {
Call InputGroupCall
Participants []GroupCallParticipant
Version int
}
const UpdateGroupCallParticipantsTypeID = 0xf2ebdb4e
func ( UpdateGroupCallParticipants) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateGroupCallParticipants{}
_ bin.Decoder = &UpdateGroupCallParticipants{}
_ bin.BareEncoder = &UpdateGroupCallParticipants{}
_ bin.BareDecoder = &UpdateGroupCallParticipants{}
_ UpdateClass = &UpdateGroupCallParticipants{}
)
func ( *UpdateGroupCallParticipants) () bool {
if == nil {
return true
}
if !(.Call.Zero()) {
return false
}
if !(.Participants == nil) {
return false
}
if !(.Version == 0) {
return false
}
return true
}
func ( *UpdateGroupCallParticipants) () string {
if == nil {
return "UpdateGroupCallParticipants(nil)"
}
type UpdateGroupCallParticipants
return fmt.Sprintf("UpdateGroupCallParticipants%+v", (*))
}
func ( *UpdateGroupCallParticipants) ( interface {
() ( InputGroupCall)
() ( []GroupCallParticipant)
() ( int)
}) {
.Call = .()
.Participants = .()
.Version = .()
}
func (*UpdateGroupCallParticipants) () uint32 {
return UpdateGroupCallParticipantsTypeID
}
func (*UpdateGroupCallParticipants) () string {
return "updateGroupCallParticipants"
}
func ( *UpdateGroupCallParticipants) () tdp.Type {
:= tdp.Type{
Name: "updateGroupCallParticipants",
ID: UpdateGroupCallParticipantsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Call",
SchemaName: "call",
},
{
Name: "Participants",
SchemaName: "participants",
},
{
Name: "Version",
SchemaName: "version",
},
}
return
}
func ( *UpdateGroupCallParticipants) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateGroupCallParticipants#f2ebdb4e as nil")
}
.PutID(UpdateGroupCallParticipantsTypeID)
return .EncodeBare()
}
func ( *UpdateGroupCallParticipants) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateGroupCallParticipants#f2ebdb4e as nil")
}
if := .Call.Encode(); != nil {
return fmt.Errorf("unable to encode updateGroupCallParticipants#f2ebdb4e: field call: %w", )
}
.PutVectorHeader(len(.Participants))
for , := range .Participants {
if := .Encode(); != nil {
return fmt.Errorf("unable to encode updateGroupCallParticipants#f2ebdb4e: field participants element with index %d: %w", , )
}
}
.PutInt(.Version)
return nil
}
func ( *UpdateGroupCallParticipants) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateGroupCallParticipants#f2ebdb4e to nil")
}
if := .ConsumeID(UpdateGroupCallParticipantsTypeID); != nil {
return fmt.Errorf("unable to decode updateGroupCallParticipants#f2ebdb4e: %w", )
}
return .DecodeBare()
}
func ( *UpdateGroupCallParticipants) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateGroupCallParticipants#f2ebdb4e to nil")
}
{
if := .Call.Decode(); != nil {
return fmt.Errorf("unable to decode updateGroupCallParticipants#f2ebdb4e: field call: %w", )
}
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateGroupCallParticipants#f2ebdb4e: field participants: %w", )
}
if > 0 {
.Participants = make([]GroupCallParticipant, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
var GroupCallParticipant
if := .Decode(); != nil {
return fmt.Errorf("unable to decode updateGroupCallParticipants#f2ebdb4e: field participants: %w", )
}
.Participants = append(.Participants, )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateGroupCallParticipants#f2ebdb4e: field version: %w", )
}
.Version =
}
return nil
}
func ( *UpdateGroupCallParticipants) () ( InputGroupCall) {
if == nil {
return
}
return .Call
}
func ( *UpdateGroupCallParticipants) () ( []GroupCallParticipant) {
if == nil {
return
}
return .Participants
}
func ( *UpdateGroupCallParticipants) () ( int) {
if == nil {
return
}
return .Version
}
type UpdateGroupCall struct {
ChatID int64
Call GroupCallClass
}
const UpdateGroupCallTypeID = 0x14b24500
func ( UpdateGroupCall) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateGroupCall{}
_ bin.Decoder = &UpdateGroupCall{}
_ bin.BareEncoder = &UpdateGroupCall{}
_ bin.BareDecoder = &UpdateGroupCall{}
_ UpdateClass = &UpdateGroupCall{}
)
func ( *UpdateGroupCall) () bool {
if == nil {
return true
}
if !(.ChatID == 0) {
return false
}
if !(.Call == nil) {
return false
}
return true
}
func ( *UpdateGroupCall) () string {
if == nil {
return "UpdateGroupCall(nil)"
}
type UpdateGroupCall
return fmt.Sprintf("UpdateGroupCall%+v", (*))
}
func ( *UpdateGroupCall) ( interface {
() ( int64)
() ( GroupCallClass)
}) {
.ChatID = .()
.Call = .()
}
func (*UpdateGroupCall) () uint32 {
return UpdateGroupCallTypeID
}
func (*UpdateGroupCall) () string {
return "updateGroupCall"
}
func ( *UpdateGroupCall) () tdp.Type {
:= tdp.Type{
Name: "updateGroupCall",
ID: UpdateGroupCallTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChatID",
SchemaName: "chat_id",
},
{
Name: "Call",
SchemaName: "call",
},
}
return
}
func ( *UpdateGroupCall) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateGroupCall#14b24500 as nil")
}
.PutID(UpdateGroupCallTypeID)
return .EncodeBare()
}
func ( *UpdateGroupCall) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateGroupCall#14b24500 as nil")
}
.PutLong(.ChatID)
if .Call == nil {
return fmt.Errorf("unable to encode updateGroupCall#14b24500: field call is nil")
}
if := .Call.Encode(); != nil {
return fmt.Errorf("unable to encode updateGroupCall#14b24500: field call: %w", )
}
return nil
}
func ( *UpdateGroupCall) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateGroupCall#14b24500 to nil")
}
if := .ConsumeID(UpdateGroupCallTypeID); != nil {
return fmt.Errorf("unable to decode updateGroupCall#14b24500: %w", )
}
return .DecodeBare()
}
func ( *UpdateGroupCall) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateGroupCall#14b24500 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateGroupCall#14b24500: field chat_id: %w", )
}
.ChatID =
}
{
, := DecodeGroupCall()
if != nil {
return fmt.Errorf("unable to decode updateGroupCall#14b24500: field call: %w", )
}
.Call =
}
return nil
}
func ( *UpdateGroupCall) () ( int64) {
if == nil {
return
}
return .ChatID
}
func ( *UpdateGroupCall) () ( GroupCallClass) {
if == nil {
return
}
return .Call
}
type UpdatePeerHistoryTTL struct {
Flags bin.Fields
Peer PeerClass
TTLPeriod int
}
const UpdatePeerHistoryTTLTypeID = 0xbb9bb9a5
func ( UpdatePeerHistoryTTL) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePeerHistoryTTL{}
_ bin.Decoder = &UpdatePeerHistoryTTL{}
_ bin.BareEncoder = &UpdatePeerHistoryTTL{}
_ bin.BareDecoder = &UpdatePeerHistoryTTL{}
_ UpdateClass = &UpdatePeerHistoryTTL{}
)
func ( *UpdatePeerHistoryTTL) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Peer == nil) {
return false
}
if !(.TTLPeriod == 0) {
return false
}
return true
}
func ( *UpdatePeerHistoryTTL) () string {
if == nil {
return "UpdatePeerHistoryTTL(nil)"
}
type UpdatePeerHistoryTTL
return fmt.Sprintf("UpdatePeerHistoryTTL%+v", (*))
}
func ( *UpdatePeerHistoryTTL) ( interface {
() ( PeerClass)
() ( int, bool)
}) {
.Peer = .()
if , := .(); {
.TTLPeriod =
}
}
func (*UpdatePeerHistoryTTL) () uint32 {
return UpdatePeerHistoryTTLTypeID
}
func (*UpdatePeerHistoryTTL) () string {
return "updatePeerHistoryTTL"
}
func ( *UpdatePeerHistoryTTL) () tdp.Type {
:= tdp.Type{
Name: "updatePeerHistoryTTL",
ID: UpdatePeerHistoryTTLTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "TTLPeriod",
SchemaName: "ttl_period",
Null: !.Flags.Has(0),
},
}
return
}
func ( *UpdatePeerHistoryTTL) () {
if !(.TTLPeriod == 0) {
.Flags.Set(0)
}
}
func ( *UpdatePeerHistoryTTL) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePeerHistoryTTL#bb9bb9a5 as nil")
}
.PutID(UpdatePeerHistoryTTLTypeID)
return .EncodeBare()
}
func ( *UpdatePeerHistoryTTL) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePeerHistoryTTL#bb9bb9a5 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updatePeerHistoryTTL#bb9bb9a5: field flags: %w", )
}
if .Peer == nil {
return fmt.Errorf("unable to encode updatePeerHistoryTTL#bb9bb9a5: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updatePeerHistoryTTL#bb9bb9a5: field peer: %w", )
}
if .Flags.Has(0) {
.PutInt(.TTLPeriod)
}
return nil
}
func ( *UpdatePeerHistoryTTL) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePeerHistoryTTL#bb9bb9a5 to nil")
}
if := .ConsumeID(UpdatePeerHistoryTTLTypeID); != nil {
return fmt.Errorf("unable to decode updatePeerHistoryTTL#bb9bb9a5: %w", )
}
return .DecodeBare()
}
func ( *UpdatePeerHistoryTTL) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePeerHistoryTTL#bb9bb9a5 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updatePeerHistoryTTL#bb9bb9a5: field flags: %w", )
}
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updatePeerHistoryTTL#bb9bb9a5: field peer: %w", )
}
.Peer =
}
if .Flags.Has(0) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updatePeerHistoryTTL#bb9bb9a5: field ttl_period: %w", )
}
.TTLPeriod =
}
return nil
}
func ( *UpdatePeerHistoryTTL) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdatePeerHistoryTTL) ( int) {
.Flags.Set(0)
.TTLPeriod =
}
func ( *UpdatePeerHistoryTTL) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .TTLPeriod, true
}
type UpdateChatParticipant struct {
Flags bin.Fields
ChatID int64
Date int
ActorID int64
UserID int64
PrevParticipant ChatParticipantClass
NewParticipant ChatParticipantClass
Invite ExportedChatInviteClass
Qts int
}
const UpdateChatParticipantTypeID = 0xd087663a
func ( UpdateChatParticipant) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChatParticipant{}
_ bin.Decoder = &UpdateChatParticipant{}
_ bin.BareEncoder = &UpdateChatParticipant{}
_ bin.BareDecoder = &UpdateChatParticipant{}
_ UpdateClass = &UpdateChatParticipant{}
)
func ( *UpdateChatParticipant) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.ChatID == 0) {
return false
}
if !(.Date == 0) {
return false
}
if !(.ActorID == 0) {
return false
}
if !(.UserID == 0) {
return false
}
if !(.PrevParticipant == nil) {
return false
}
if !(.NewParticipant == nil) {
return false
}
if !(.Invite == nil) {
return false
}
if !(.Qts == 0) {
return false
}
return true
}
func ( *UpdateChatParticipant) () string {
if == nil {
return "UpdateChatParticipant(nil)"
}
type UpdateChatParticipant
return fmt.Sprintf("UpdateChatParticipant%+v", (*))
}
func ( *UpdateChatParticipant) ( interface {
() ( int64)
() ( int)
() ( int64)
() ( int64)
() ( ChatParticipantClass, bool)
() ( ChatParticipantClass, bool)
() ( ExportedChatInviteClass, bool)
() ( int)
}) {
.ChatID = .()
.Date = .()
.ActorID = .()
.UserID = .()
if , := .(); {
.PrevParticipant =
}
if , := .(); {
.NewParticipant =
}
if , := .(); {
.Invite =
}
.Qts = .()
}
func (*UpdateChatParticipant) () uint32 {
return UpdateChatParticipantTypeID
}
func (*UpdateChatParticipant) () string {
return "updateChatParticipant"
}
func ( *UpdateChatParticipant) () tdp.Type {
:= tdp.Type{
Name: "updateChatParticipant",
ID: UpdateChatParticipantTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChatID",
SchemaName: "chat_id",
},
{
Name: "Date",
SchemaName: "date",
},
{
Name: "ActorID",
SchemaName: "actor_id",
},
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "PrevParticipant",
SchemaName: "prev_participant",
Null: !.Flags.Has(0),
},
{
Name: "NewParticipant",
SchemaName: "new_participant",
Null: !.Flags.Has(1),
},
{
Name: "Invite",
SchemaName: "invite",
Null: !.Flags.Has(2),
},
{
Name: "Qts",
SchemaName: "qts",
},
}
return
}
func ( *UpdateChatParticipant) () {
if !(.PrevParticipant == nil) {
.Flags.Set(0)
}
if !(.NewParticipant == nil) {
.Flags.Set(1)
}
if !(.Invite == nil) {
.Flags.Set(2)
}
}
func ( *UpdateChatParticipant) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatParticipant#d087663a as nil")
}
.PutID(UpdateChatParticipantTypeID)
return .EncodeBare()
}
func ( *UpdateChatParticipant) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChatParticipant#d087663a as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateChatParticipant#d087663a: field flags: %w", )
}
.PutLong(.ChatID)
.PutInt(.Date)
.PutLong(.ActorID)
.PutLong(.UserID)
if .Flags.Has(0) {
if .PrevParticipant == nil {
return fmt.Errorf("unable to encode updateChatParticipant#d087663a: field prev_participant is nil")
}
if := .PrevParticipant.Encode(); != nil {
return fmt.Errorf("unable to encode updateChatParticipant#d087663a: field prev_participant: %w", )
}
}
if .Flags.Has(1) {
if .NewParticipant == nil {
return fmt.Errorf("unable to encode updateChatParticipant#d087663a: field new_participant is nil")
}
if := .NewParticipant.Encode(); != nil {
return fmt.Errorf("unable to encode updateChatParticipant#d087663a: field new_participant: %w", )
}
}
if .Flags.Has(2) {
if .Invite == nil {
return fmt.Errorf("unable to encode updateChatParticipant#d087663a: field invite is nil")
}
if := .Invite.Encode(); != nil {
return fmt.Errorf("unable to encode updateChatParticipant#d087663a: field invite: %w", )
}
}
.PutInt(.Qts)
return nil
}
func ( *UpdateChatParticipant) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatParticipant#d087663a to nil")
}
if := .ConsumeID(UpdateChatParticipantTypeID); != nil {
return fmt.Errorf("unable to decode updateChatParticipant#d087663a: %w", )
}
return .DecodeBare()
}
func ( *UpdateChatParticipant) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChatParticipant#d087663a to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateChatParticipant#d087663a: field flags: %w", )
}
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipant#d087663a: field chat_id: %w", )
}
.ChatID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipant#d087663a: field date: %w", )
}
.Date =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipant#d087663a: field actor_id: %w", )
}
.ActorID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipant#d087663a: field user_id: %w", )
}
.UserID =
}
if .Flags.Has(0) {
, := DecodeChatParticipant()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipant#d087663a: field prev_participant: %w", )
}
.PrevParticipant =
}
if .Flags.Has(1) {
, := DecodeChatParticipant()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipant#d087663a: field new_participant: %w", )
}
.NewParticipant =
}
if .Flags.Has(2) {
, := DecodeExportedChatInvite()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipant#d087663a: field invite: %w", )
}
.Invite =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChatParticipant#d087663a: field qts: %w", )
}
.Qts =
}
return nil
}
func ( *UpdateChatParticipant) () ( int64) {
if == nil {
return
}
return .ChatID
}
func ( *UpdateChatParticipant) () ( int) {
if == nil {
return
}
return .Date
}
func ( *UpdateChatParticipant) () ( int64) {
if == nil {
return
}
return .ActorID
}
func ( *UpdateChatParticipant) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateChatParticipant) ( ChatParticipantClass) {
.Flags.Set(0)
.PrevParticipant =
}
func ( *UpdateChatParticipant) () ( ChatParticipantClass, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .PrevParticipant, true
}
func ( *UpdateChatParticipant) ( ChatParticipantClass) {
.Flags.Set(1)
.NewParticipant =
}
func ( *UpdateChatParticipant) () ( ChatParticipantClass, bool) {
if == nil {
return
}
if !.Flags.Has(1) {
return , false
}
return .NewParticipant, true
}
func ( *UpdateChatParticipant) ( ExportedChatInviteClass) {
.Flags.Set(2)
.Invite =
}
func ( *UpdateChatParticipant) () ( ExportedChatInviteClass, bool) {
if == nil {
return
}
if !.Flags.Has(2) {
return , false
}
return .Invite, true
}
func ( *UpdateChatParticipant) () ( int) {
if == nil {
return
}
return .Qts
}
type UpdateChannelParticipant struct {
Flags bin.Fields
ViaChatlist bool
ChannelID int64
Date int
ActorID int64
UserID int64
PrevParticipant ChannelParticipantClass
NewParticipant ChannelParticipantClass
Invite ExportedChatInviteClass
Qts int
}
const UpdateChannelParticipantTypeID = 0x985d3abb
func ( UpdateChannelParticipant) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChannelParticipant{}
_ bin.Decoder = &UpdateChannelParticipant{}
_ bin.BareEncoder = &UpdateChannelParticipant{}
_ bin.BareDecoder = &UpdateChannelParticipant{}
_ UpdateClass = &UpdateChannelParticipant{}
)
func ( *UpdateChannelParticipant) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.ViaChatlist == false) {
return false
}
if !(.ChannelID == 0) {
return false
}
if !(.Date == 0) {
return false
}
if !(.ActorID == 0) {
return false
}
if !(.UserID == 0) {
return false
}
if !(.PrevParticipant == nil) {
return false
}
if !(.NewParticipant == nil) {
return false
}
if !(.Invite == nil) {
return false
}
if !(.Qts == 0) {
return false
}
return true
}
func ( *UpdateChannelParticipant) () string {
if == nil {
return "UpdateChannelParticipant(nil)"
}
type UpdateChannelParticipant
return fmt.Sprintf("UpdateChannelParticipant%+v", (*))
}
func ( *UpdateChannelParticipant) ( interface {
() ( bool)
() ( int64)
() ( int)
() ( int64)
() ( int64)
() ( ChannelParticipantClass, bool)
() ( ChannelParticipantClass, bool)
() ( ExportedChatInviteClass, bool)
() ( int)
}) {
.ViaChatlist = .()
.ChannelID = .()
.Date = .()
.ActorID = .()
.UserID = .()
if , := .(); {
.PrevParticipant =
}
if , := .(); {
.NewParticipant =
}
if , := .(); {
.Invite =
}
.Qts = .()
}
func (*UpdateChannelParticipant) () uint32 {
return UpdateChannelParticipantTypeID
}
func (*UpdateChannelParticipant) () string {
return "updateChannelParticipant"
}
func ( *UpdateChannelParticipant) () tdp.Type {
:= tdp.Type{
Name: "updateChannelParticipant",
ID: UpdateChannelParticipantTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ViaChatlist",
SchemaName: "via_chatlist",
Null: !.Flags.Has(3),
},
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "Date",
SchemaName: "date",
},
{
Name: "ActorID",
SchemaName: "actor_id",
},
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "PrevParticipant",
SchemaName: "prev_participant",
Null: !.Flags.Has(0),
},
{
Name: "NewParticipant",
SchemaName: "new_participant",
Null: !.Flags.Has(1),
},
{
Name: "Invite",
SchemaName: "invite",
Null: !.Flags.Has(2),
},
{
Name: "Qts",
SchemaName: "qts",
},
}
return
}
func ( *UpdateChannelParticipant) () {
if !(.ViaChatlist == false) {
.Flags.Set(3)
}
if !(.PrevParticipant == nil) {
.Flags.Set(0)
}
if !(.NewParticipant == nil) {
.Flags.Set(1)
}
if !(.Invite == nil) {
.Flags.Set(2)
}
}
func ( *UpdateChannelParticipant) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelParticipant#985d3abb as nil")
}
.PutID(UpdateChannelParticipantTypeID)
return .EncodeBare()
}
func ( *UpdateChannelParticipant) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelParticipant#985d3abb as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateChannelParticipant#985d3abb: field flags: %w", )
}
.PutLong(.ChannelID)
.PutInt(.Date)
.PutLong(.ActorID)
.PutLong(.UserID)
if .Flags.Has(0) {
if .PrevParticipant == nil {
return fmt.Errorf("unable to encode updateChannelParticipant#985d3abb: field prev_participant is nil")
}
if := .PrevParticipant.Encode(); != nil {
return fmt.Errorf("unable to encode updateChannelParticipant#985d3abb: field prev_participant: %w", )
}
}
if .Flags.Has(1) {
if .NewParticipant == nil {
return fmt.Errorf("unable to encode updateChannelParticipant#985d3abb: field new_participant is nil")
}
if := .NewParticipant.Encode(); != nil {
return fmt.Errorf("unable to encode updateChannelParticipant#985d3abb: field new_participant: %w", )
}
}
if .Flags.Has(2) {
if .Invite == nil {
return fmt.Errorf("unable to encode updateChannelParticipant#985d3abb: field invite is nil")
}
if := .Invite.Encode(); != nil {
return fmt.Errorf("unable to encode updateChannelParticipant#985d3abb: field invite: %w", )
}
}
.PutInt(.Qts)
return nil
}
func ( *UpdateChannelParticipant) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelParticipant#985d3abb to nil")
}
if := .ConsumeID(UpdateChannelParticipantTypeID); != nil {
return fmt.Errorf("unable to decode updateChannelParticipant#985d3abb: %w", )
}
return .DecodeBare()
}
func ( *UpdateChannelParticipant) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelParticipant#985d3abb to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateChannelParticipant#985d3abb: field flags: %w", )
}
}
.ViaChatlist = .Flags.Has(3)
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelParticipant#985d3abb: field channel_id: %w", )
}
.ChannelID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelParticipant#985d3abb: field date: %w", )
}
.Date =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelParticipant#985d3abb: field actor_id: %w", )
}
.ActorID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelParticipant#985d3abb: field user_id: %w", )
}
.UserID =
}
if .Flags.Has(0) {
, := DecodeChannelParticipant()
if != nil {
return fmt.Errorf("unable to decode updateChannelParticipant#985d3abb: field prev_participant: %w", )
}
.PrevParticipant =
}
if .Flags.Has(1) {
, := DecodeChannelParticipant()
if != nil {
return fmt.Errorf("unable to decode updateChannelParticipant#985d3abb: field new_participant: %w", )
}
.NewParticipant =
}
if .Flags.Has(2) {
, := DecodeExportedChatInvite()
if != nil {
return fmt.Errorf("unable to decode updateChannelParticipant#985d3abb: field invite: %w", )
}
.Invite =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelParticipant#985d3abb: field qts: %w", )
}
.Qts =
}
return nil
}
func ( *UpdateChannelParticipant) ( bool) {
if {
.Flags.Set(3)
.ViaChatlist = true
} else {
.Flags.Unset(3)
.ViaChatlist = false
}
}
func ( *UpdateChannelParticipant) () ( bool) {
if == nil {
return
}
return .Flags.Has(3)
}
func ( *UpdateChannelParticipant) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateChannelParticipant) () ( int) {
if == nil {
return
}
return .Date
}
func ( *UpdateChannelParticipant) () ( int64) {
if == nil {
return
}
return .ActorID
}
func ( *UpdateChannelParticipant) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateChannelParticipant) ( ChannelParticipantClass) {
.Flags.Set(0)
.PrevParticipant =
}
func ( *UpdateChannelParticipant) () ( ChannelParticipantClass, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .PrevParticipant, true
}
func ( *UpdateChannelParticipant) ( ChannelParticipantClass) {
.Flags.Set(1)
.NewParticipant =
}
func ( *UpdateChannelParticipant) () ( ChannelParticipantClass, bool) {
if == nil {
return
}
if !.Flags.Has(1) {
return , false
}
return .NewParticipant, true
}
func ( *UpdateChannelParticipant) ( ExportedChatInviteClass) {
.Flags.Set(2)
.Invite =
}
func ( *UpdateChannelParticipant) () ( ExportedChatInviteClass, bool) {
if == nil {
return
}
if !.Flags.Has(2) {
return , false
}
return .Invite, true
}
func ( *UpdateChannelParticipant) () ( int) {
if == nil {
return
}
return .Qts
}
type UpdateBotStopped struct {
UserID int64
Date int
Stopped bool
Qts int
}
const UpdateBotStoppedTypeID = 0xc4870a49
func ( UpdateBotStopped) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotStopped{}
_ bin.Decoder = &UpdateBotStopped{}
_ bin.BareEncoder = &UpdateBotStopped{}
_ bin.BareDecoder = &UpdateBotStopped{}
_ UpdateClass = &UpdateBotStopped{}
)
func ( *UpdateBotStopped) () bool {
if == nil {
return true
}
if !(.UserID == 0) {
return false
}
if !(.Date == 0) {
return false
}
if !(.Stopped == false) {
return false
}
if !(.Qts == 0) {
return false
}
return true
}
func ( *UpdateBotStopped) () string {
if == nil {
return "UpdateBotStopped(nil)"
}
type UpdateBotStopped
return fmt.Sprintf("UpdateBotStopped%+v", (*))
}
func ( *UpdateBotStopped) ( interface {
() ( int64)
() ( int)
() ( bool)
() ( int)
}) {
.UserID = .()
.Date = .()
.Stopped = .()
.Qts = .()
}
func (*UpdateBotStopped) () uint32 {
return UpdateBotStoppedTypeID
}
func (*UpdateBotStopped) () string {
return "updateBotStopped"
}
func ( *UpdateBotStopped) () tdp.Type {
:= tdp.Type{
Name: "updateBotStopped",
ID: UpdateBotStoppedTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "Date",
SchemaName: "date",
},
{
Name: "Stopped",
SchemaName: "stopped",
},
{
Name: "Qts",
SchemaName: "qts",
},
}
return
}
func ( *UpdateBotStopped) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotStopped#c4870a49 as nil")
}
.PutID(UpdateBotStoppedTypeID)
return .EncodeBare()
}
func ( *UpdateBotStopped) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotStopped#c4870a49 as nil")
}
.PutLong(.UserID)
.PutInt(.Date)
.PutBool(.Stopped)
.PutInt(.Qts)
return nil
}
func ( *UpdateBotStopped) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotStopped#c4870a49 to nil")
}
if := .ConsumeID(UpdateBotStoppedTypeID); != nil {
return fmt.Errorf("unable to decode updateBotStopped#c4870a49: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotStopped) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotStopped#c4870a49 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotStopped#c4870a49: field user_id: %w", )
}
.UserID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotStopped#c4870a49: field date: %w", )
}
.Date =
}
{
, := .Bool()
if != nil {
return fmt.Errorf("unable to decode updateBotStopped#c4870a49: field stopped: %w", )
}
.Stopped =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotStopped#c4870a49: field qts: %w", )
}
.Qts =
}
return nil
}
func ( *UpdateBotStopped) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateBotStopped) () ( int) {
if == nil {
return
}
return .Date
}
func ( *UpdateBotStopped) () ( bool) {
if == nil {
return
}
return .Stopped
}
func ( *UpdateBotStopped) () ( int) {
if == nil {
return
}
return .Qts
}
type UpdateGroupCallConnection struct {
Flags bin.Fields
Presentation bool
Params DataJSON
}
const UpdateGroupCallConnectionTypeID = 0xb783982
func ( UpdateGroupCallConnection) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateGroupCallConnection{}
_ bin.Decoder = &UpdateGroupCallConnection{}
_ bin.BareEncoder = &UpdateGroupCallConnection{}
_ bin.BareDecoder = &UpdateGroupCallConnection{}
_ UpdateClass = &UpdateGroupCallConnection{}
)
func ( *UpdateGroupCallConnection) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Presentation == false) {
return false
}
if !(.Params.Zero()) {
return false
}
return true
}
func ( *UpdateGroupCallConnection) () string {
if == nil {
return "UpdateGroupCallConnection(nil)"
}
type UpdateGroupCallConnection
return fmt.Sprintf("UpdateGroupCallConnection%+v", (*))
}
func ( *UpdateGroupCallConnection) ( interface {
() ( bool)
() ( DataJSON)
}) {
.Presentation = .()
.Params = .()
}
func (*UpdateGroupCallConnection) () uint32 {
return UpdateGroupCallConnectionTypeID
}
func (*UpdateGroupCallConnection) () string {
return "updateGroupCallConnection"
}
func ( *UpdateGroupCallConnection) () tdp.Type {
:= tdp.Type{
Name: "updateGroupCallConnection",
ID: UpdateGroupCallConnectionTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Presentation",
SchemaName: "presentation",
Null: !.Flags.Has(0),
},
{
Name: "Params",
SchemaName: "params",
},
}
return
}
func ( *UpdateGroupCallConnection) () {
if !(.Presentation == false) {
.Flags.Set(0)
}
}
func ( *UpdateGroupCallConnection) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateGroupCallConnection#b783982 as nil")
}
.PutID(UpdateGroupCallConnectionTypeID)
return .EncodeBare()
}
func ( *UpdateGroupCallConnection) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateGroupCallConnection#b783982 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateGroupCallConnection#b783982: field flags: %w", )
}
if := .Params.Encode(); != nil {
return fmt.Errorf("unable to encode updateGroupCallConnection#b783982: field params: %w", )
}
return nil
}
func ( *UpdateGroupCallConnection) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateGroupCallConnection#b783982 to nil")
}
if := .ConsumeID(UpdateGroupCallConnectionTypeID); != nil {
return fmt.Errorf("unable to decode updateGroupCallConnection#b783982: %w", )
}
return .DecodeBare()
}
func ( *UpdateGroupCallConnection) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateGroupCallConnection#b783982 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateGroupCallConnection#b783982: field flags: %w", )
}
}
.Presentation = .Flags.Has(0)
{
if := .Params.Decode(); != nil {
return fmt.Errorf("unable to decode updateGroupCallConnection#b783982: field params: %w", )
}
}
return nil
}
func ( *UpdateGroupCallConnection) ( bool) {
if {
.Flags.Set(0)
.Presentation = true
} else {
.Flags.Unset(0)
.Presentation = false
}
}
func ( *UpdateGroupCallConnection) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdateGroupCallConnection) () ( DataJSON) {
if == nil {
return
}
return .Params
}
type UpdateBotCommands struct {
Peer PeerClass
BotID int64
Commands []BotCommand
}
const UpdateBotCommandsTypeID = 0x4d712f2e
func ( UpdateBotCommands) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotCommands{}
_ bin.Decoder = &UpdateBotCommands{}
_ bin.BareEncoder = &UpdateBotCommands{}
_ bin.BareDecoder = &UpdateBotCommands{}
_ UpdateClass = &UpdateBotCommands{}
)
func ( *UpdateBotCommands) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.BotID == 0) {
return false
}
if !(.Commands == nil) {
return false
}
return true
}
func ( *UpdateBotCommands) () string {
if == nil {
return "UpdateBotCommands(nil)"
}
type UpdateBotCommands
return fmt.Sprintf("UpdateBotCommands%+v", (*))
}
func ( *UpdateBotCommands) ( interface {
() ( PeerClass)
() ( int64)
() ( []BotCommand)
}) {
.Peer = .()
.BotID = .()
.Commands = .()
}
func (*UpdateBotCommands) () uint32 {
return UpdateBotCommandsTypeID
}
func (*UpdateBotCommands) () string {
return "updateBotCommands"
}
func ( *UpdateBotCommands) () tdp.Type {
:= tdp.Type{
Name: "updateBotCommands",
ID: UpdateBotCommandsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "BotID",
SchemaName: "bot_id",
},
{
Name: "Commands",
SchemaName: "commands",
},
}
return
}
func ( *UpdateBotCommands) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotCommands#4d712f2e as nil")
}
.PutID(UpdateBotCommandsTypeID)
return .EncodeBare()
}
func ( *UpdateBotCommands) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotCommands#4d712f2e as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateBotCommands#4d712f2e: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotCommands#4d712f2e: field peer: %w", )
}
.PutLong(.BotID)
.PutVectorHeader(len(.Commands))
for , := range .Commands {
if := .Encode(); != nil {
return fmt.Errorf("unable to encode updateBotCommands#4d712f2e: field commands element with index %d: %w", , )
}
}
return nil
}
func ( *UpdateBotCommands) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotCommands#4d712f2e to nil")
}
if := .ConsumeID(UpdateBotCommandsTypeID); != nil {
return fmt.Errorf("unable to decode updateBotCommands#4d712f2e: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotCommands) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotCommands#4d712f2e to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateBotCommands#4d712f2e: field peer: %w", )
}
.Peer =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotCommands#4d712f2e: field bot_id: %w", )
}
.BotID =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateBotCommands#4d712f2e: field commands: %w", )
}
if > 0 {
.Commands = make([]BotCommand, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
var BotCommand
if := .Decode(); != nil {
return fmt.Errorf("unable to decode updateBotCommands#4d712f2e: field commands: %w", )
}
.Commands = append(.Commands, )
}
}
return nil
}
func ( *UpdateBotCommands) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateBotCommands) () ( int64) {
if == nil {
return
}
return .BotID
}
func ( *UpdateBotCommands) () ( []BotCommand) {
if == nil {
return
}
return .Commands
}
type UpdatePendingJoinRequests struct {
Peer PeerClass
RequestsPending int
RecentRequesters []int64
}
const UpdatePendingJoinRequestsTypeID = 0x7063c3db
func ( UpdatePendingJoinRequests) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePendingJoinRequests{}
_ bin.Decoder = &UpdatePendingJoinRequests{}
_ bin.BareEncoder = &UpdatePendingJoinRequests{}
_ bin.BareDecoder = &UpdatePendingJoinRequests{}
_ UpdateClass = &UpdatePendingJoinRequests{}
)
func ( *UpdatePendingJoinRequests) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.RequestsPending == 0) {
return false
}
if !(.RecentRequesters == nil) {
return false
}
return true
}
func ( *UpdatePendingJoinRequests) () string {
if == nil {
return "UpdatePendingJoinRequests(nil)"
}
type UpdatePendingJoinRequests
return fmt.Sprintf("UpdatePendingJoinRequests%+v", (*))
}
func ( *UpdatePendingJoinRequests) ( interface {
() ( PeerClass)
() ( int)
() ( []int64)
}) {
.Peer = .()
.RequestsPending = .()
.RecentRequesters = .()
}
func (*UpdatePendingJoinRequests) () uint32 {
return UpdatePendingJoinRequestsTypeID
}
func (*UpdatePendingJoinRequests) () string {
return "updatePendingJoinRequests"
}
func ( *UpdatePendingJoinRequests) () tdp.Type {
:= tdp.Type{
Name: "updatePendingJoinRequests",
ID: UpdatePendingJoinRequestsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "RequestsPending",
SchemaName: "requests_pending",
},
{
Name: "RecentRequesters",
SchemaName: "recent_requesters",
},
}
return
}
func ( *UpdatePendingJoinRequests) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePendingJoinRequests#7063c3db as nil")
}
.PutID(UpdatePendingJoinRequestsTypeID)
return .EncodeBare()
}
func ( *UpdatePendingJoinRequests) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePendingJoinRequests#7063c3db as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updatePendingJoinRequests#7063c3db: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updatePendingJoinRequests#7063c3db: field peer: %w", )
}
.PutInt(.RequestsPending)
.PutVectorHeader(len(.RecentRequesters))
for , := range .RecentRequesters {
.PutLong()
}
return nil
}
func ( *UpdatePendingJoinRequests) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePendingJoinRequests#7063c3db to nil")
}
if := .ConsumeID(UpdatePendingJoinRequestsTypeID); != nil {
return fmt.Errorf("unable to decode updatePendingJoinRequests#7063c3db: %w", )
}
return .DecodeBare()
}
func ( *UpdatePendingJoinRequests) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePendingJoinRequests#7063c3db to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updatePendingJoinRequests#7063c3db: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updatePendingJoinRequests#7063c3db: field requests_pending: %w", )
}
.RequestsPending =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updatePendingJoinRequests#7063c3db: field recent_requesters: %w", )
}
if > 0 {
.RecentRequesters = make([]int64, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updatePendingJoinRequests#7063c3db: field recent_requesters: %w", )
}
.RecentRequesters = append(.RecentRequesters, )
}
}
return nil
}
func ( *UpdatePendingJoinRequests) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdatePendingJoinRequests) () ( int) {
if == nil {
return
}
return .RequestsPending
}
func ( *UpdatePendingJoinRequests) () ( []int64) {
if == nil {
return
}
return .RecentRequesters
}
type UpdateBotChatInviteRequester struct {
Peer PeerClass
Date int
UserID int64
About string
Invite ExportedChatInviteClass
Qts int
}
const UpdateBotChatInviteRequesterTypeID = 0x11dfa986
func ( UpdateBotChatInviteRequester) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotChatInviteRequester{}
_ bin.Decoder = &UpdateBotChatInviteRequester{}
_ bin.BareEncoder = &UpdateBotChatInviteRequester{}
_ bin.BareDecoder = &UpdateBotChatInviteRequester{}
_ UpdateClass = &UpdateBotChatInviteRequester{}
)
func ( *UpdateBotChatInviteRequester) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.Date == 0) {
return false
}
if !(.UserID == 0) {
return false
}
if !(.About == "") {
return false
}
if !(.Invite == nil) {
return false
}
if !(.Qts == 0) {
return false
}
return true
}
func ( *UpdateBotChatInviteRequester) () string {
if == nil {
return "UpdateBotChatInviteRequester(nil)"
}
type UpdateBotChatInviteRequester
return fmt.Sprintf("UpdateBotChatInviteRequester%+v", (*))
}
func ( *UpdateBotChatInviteRequester) ( interface {
() ( PeerClass)
() ( int)
() ( int64)
() ( string)
() ( ExportedChatInviteClass)
() ( int)
}) {
.Peer = .()
.Date = .()
.UserID = .()
.About = .()
.Invite = .()
.Qts = .()
}
func (*UpdateBotChatInviteRequester) () uint32 {
return UpdateBotChatInviteRequesterTypeID
}
func (*UpdateBotChatInviteRequester) () string {
return "updateBotChatInviteRequester"
}
func ( *UpdateBotChatInviteRequester) () tdp.Type {
:= tdp.Type{
Name: "updateBotChatInviteRequester",
ID: UpdateBotChatInviteRequesterTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "Date",
SchemaName: "date",
},
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "About",
SchemaName: "about",
},
{
Name: "Invite",
SchemaName: "invite",
},
{
Name: "Qts",
SchemaName: "qts",
},
}
return
}
func ( *UpdateBotChatInviteRequester) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotChatInviteRequester#11dfa986 as nil")
}
.PutID(UpdateBotChatInviteRequesterTypeID)
return .EncodeBare()
}
func ( *UpdateBotChatInviteRequester) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotChatInviteRequester#11dfa986 as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateBotChatInviteRequester#11dfa986: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotChatInviteRequester#11dfa986: field peer: %w", )
}
.PutInt(.Date)
.PutLong(.UserID)
.PutString(.About)
if .Invite == nil {
return fmt.Errorf("unable to encode updateBotChatInviteRequester#11dfa986: field invite is nil")
}
if := .Invite.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotChatInviteRequester#11dfa986: field invite: %w", )
}
.PutInt(.Qts)
return nil
}
func ( *UpdateBotChatInviteRequester) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotChatInviteRequester#11dfa986 to nil")
}
if := .ConsumeID(UpdateBotChatInviteRequesterTypeID); != nil {
return fmt.Errorf("unable to decode updateBotChatInviteRequester#11dfa986: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotChatInviteRequester) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotChatInviteRequester#11dfa986 to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateBotChatInviteRequester#11dfa986: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotChatInviteRequester#11dfa986: field date: %w", )
}
.Date =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotChatInviteRequester#11dfa986: field user_id: %w", )
}
.UserID =
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateBotChatInviteRequester#11dfa986: field about: %w", )
}
.About =
}
{
, := DecodeExportedChatInvite()
if != nil {
return fmt.Errorf("unable to decode updateBotChatInviteRequester#11dfa986: field invite: %w", )
}
.Invite =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotChatInviteRequester#11dfa986: field qts: %w", )
}
.Qts =
}
return nil
}
func ( *UpdateBotChatInviteRequester) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateBotChatInviteRequester) () ( int) {
if == nil {
return
}
return .Date
}
func ( *UpdateBotChatInviteRequester) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateBotChatInviteRequester) () ( string) {
if == nil {
return
}
return .About
}
func ( *UpdateBotChatInviteRequester) () ( ExportedChatInviteClass) {
if == nil {
return
}
return .Invite
}
func ( *UpdateBotChatInviteRequester) () ( int) {
if == nil {
return
}
return .Qts
}
type UpdateMessageReactions struct {
Flags bin.Fields
Peer PeerClass
MsgID int
TopMsgID int
Reactions MessageReactions
}
const UpdateMessageReactionsTypeID = 0x5e1b3cb8
func ( UpdateMessageReactions) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateMessageReactions{}
_ bin.Decoder = &UpdateMessageReactions{}
_ bin.BareEncoder = &UpdateMessageReactions{}
_ bin.BareDecoder = &UpdateMessageReactions{}
_ UpdateClass = &UpdateMessageReactions{}
)
func ( *UpdateMessageReactions) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Peer == nil) {
return false
}
if !(.MsgID == 0) {
return false
}
if !(.TopMsgID == 0) {
return false
}
if !(.Reactions.Zero()) {
return false
}
return true
}
func ( *UpdateMessageReactions) () string {
if == nil {
return "UpdateMessageReactions(nil)"
}
type UpdateMessageReactions
return fmt.Sprintf("UpdateMessageReactions%+v", (*))
}
func ( *UpdateMessageReactions) ( interface {
() ( PeerClass)
() ( int)
() ( int, bool)
() ( MessageReactions)
}) {
.Peer = .()
.MsgID = .()
if , := .(); {
.TopMsgID =
}
.Reactions = .()
}
func (*UpdateMessageReactions) () uint32 {
return UpdateMessageReactionsTypeID
}
func (*UpdateMessageReactions) () string {
return "updateMessageReactions"
}
func ( *UpdateMessageReactions) () tdp.Type {
:= tdp.Type{
Name: "updateMessageReactions",
ID: UpdateMessageReactionsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "MsgID",
SchemaName: "msg_id",
},
{
Name: "TopMsgID",
SchemaName: "top_msg_id",
Null: !.Flags.Has(0),
},
{
Name: "Reactions",
SchemaName: "reactions",
},
}
return
}
func ( *UpdateMessageReactions) () {
if !(.TopMsgID == 0) {
.Flags.Set(0)
}
}
func ( *UpdateMessageReactions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateMessageReactions#5e1b3cb8 as nil")
}
.PutID(UpdateMessageReactionsTypeID)
return .EncodeBare()
}
func ( *UpdateMessageReactions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateMessageReactions#5e1b3cb8 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateMessageReactions#5e1b3cb8: field flags: %w", )
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateMessageReactions#5e1b3cb8: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateMessageReactions#5e1b3cb8: field peer: %w", )
}
.PutInt(.MsgID)
if .Flags.Has(0) {
.PutInt(.TopMsgID)
}
if := .Reactions.Encode(); != nil {
return fmt.Errorf("unable to encode updateMessageReactions#5e1b3cb8: field reactions: %w", )
}
return nil
}
func ( *UpdateMessageReactions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateMessageReactions#5e1b3cb8 to nil")
}
if := .ConsumeID(UpdateMessageReactionsTypeID); != nil {
return fmt.Errorf("unable to decode updateMessageReactions#5e1b3cb8: %w", )
}
return .DecodeBare()
}
func ( *UpdateMessageReactions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateMessageReactions#5e1b3cb8 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateMessageReactions#5e1b3cb8: field flags: %w", )
}
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateMessageReactions#5e1b3cb8: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateMessageReactions#5e1b3cb8: field msg_id: %w", )
}
.MsgID =
}
if .Flags.Has(0) {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateMessageReactions#5e1b3cb8: field top_msg_id: %w", )
}
.TopMsgID =
}
{
if := .Reactions.Decode(); != nil {
return fmt.Errorf("unable to decode updateMessageReactions#5e1b3cb8: field reactions: %w", )
}
}
return nil
}
func ( *UpdateMessageReactions) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateMessageReactions) () ( int) {
if == nil {
return
}
return .MsgID
}
func ( *UpdateMessageReactions) ( int) {
.Flags.Set(0)
.TopMsgID =
}
func ( *UpdateMessageReactions) () ( int, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .TopMsgID, true
}
func ( *UpdateMessageReactions) () ( MessageReactions) {
if == nil {
return
}
return .Reactions
}
type UpdateAttachMenuBots struct {
}
const UpdateAttachMenuBotsTypeID = 0x17b7a20b
func ( UpdateAttachMenuBots) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateAttachMenuBots{}
_ bin.Decoder = &UpdateAttachMenuBots{}
_ bin.BareEncoder = &UpdateAttachMenuBots{}
_ bin.BareDecoder = &UpdateAttachMenuBots{}
_ UpdateClass = &UpdateAttachMenuBots{}
)
func ( *UpdateAttachMenuBots) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateAttachMenuBots) () string {
if == nil {
return "UpdateAttachMenuBots(nil)"
}
type UpdateAttachMenuBots
return fmt.Sprintf("UpdateAttachMenuBots%+v", (*))
}
func (*UpdateAttachMenuBots) () uint32 {
return UpdateAttachMenuBotsTypeID
}
func (*UpdateAttachMenuBots) () string {
return "updateAttachMenuBots"
}
func ( *UpdateAttachMenuBots) () tdp.Type {
:= tdp.Type{
Name: "updateAttachMenuBots",
ID: UpdateAttachMenuBotsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateAttachMenuBots) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateAttachMenuBots#17b7a20b as nil")
}
.PutID(UpdateAttachMenuBotsTypeID)
return .EncodeBare()
}
func ( *UpdateAttachMenuBots) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateAttachMenuBots#17b7a20b as nil")
}
return nil
}
func ( *UpdateAttachMenuBots) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateAttachMenuBots#17b7a20b to nil")
}
if := .ConsumeID(UpdateAttachMenuBotsTypeID); != nil {
return fmt.Errorf("unable to decode updateAttachMenuBots#17b7a20b: %w", )
}
return .DecodeBare()
}
func ( *UpdateAttachMenuBots) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateAttachMenuBots#17b7a20b to nil")
}
return nil
}
type UpdateWebViewResultSent struct {
QueryID int64
}
const UpdateWebViewResultSentTypeID = 0x1592b79d
func ( UpdateWebViewResultSent) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateWebViewResultSent{}
_ bin.Decoder = &UpdateWebViewResultSent{}
_ bin.BareEncoder = &UpdateWebViewResultSent{}
_ bin.BareDecoder = &UpdateWebViewResultSent{}
_ UpdateClass = &UpdateWebViewResultSent{}
)
func ( *UpdateWebViewResultSent) () bool {
if == nil {
return true
}
if !(.QueryID == 0) {
return false
}
return true
}
func ( *UpdateWebViewResultSent) () string {
if == nil {
return "UpdateWebViewResultSent(nil)"
}
type UpdateWebViewResultSent
return fmt.Sprintf("UpdateWebViewResultSent%+v", (*))
}
func ( *UpdateWebViewResultSent) ( interface {
() ( int64)
}) {
.QueryID = .()
}
func (*UpdateWebViewResultSent) () uint32 {
return UpdateWebViewResultSentTypeID
}
func (*UpdateWebViewResultSent) () string {
return "updateWebViewResultSent"
}
func ( *UpdateWebViewResultSent) () tdp.Type {
:= tdp.Type{
Name: "updateWebViewResultSent",
ID: UpdateWebViewResultSentTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "QueryID",
SchemaName: "query_id",
},
}
return
}
func ( *UpdateWebViewResultSent) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateWebViewResultSent#1592b79d as nil")
}
.PutID(UpdateWebViewResultSentTypeID)
return .EncodeBare()
}
func ( *UpdateWebViewResultSent) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateWebViewResultSent#1592b79d as nil")
}
.PutLong(.QueryID)
return nil
}
func ( *UpdateWebViewResultSent) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateWebViewResultSent#1592b79d to nil")
}
if := .ConsumeID(UpdateWebViewResultSentTypeID); != nil {
return fmt.Errorf("unable to decode updateWebViewResultSent#1592b79d: %w", )
}
return .DecodeBare()
}
func ( *UpdateWebViewResultSent) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateWebViewResultSent#1592b79d to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateWebViewResultSent#1592b79d: field query_id: %w", )
}
.QueryID =
}
return nil
}
func ( *UpdateWebViewResultSent) () ( int64) {
if == nil {
return
}
return .QueryID
}
type UpdateBotMenuButton struct {
BotID int64
Button BotMenuButtonClass
}
const UpdateBotMenuButtonTypeID = 0x14b85813
func ( UpdateBotMenuButton) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotMenuButton{}
_ bin.Decoder = &UpdateBotMenuButton{}
_ bin.BareEncoder = &UpdateBotMenuButton{}
_ bin.BareDecoder = &UpdateBotMenuButton{}
_ UpdateClass = &UpdateBotMenuButton{}
)
func ( *UpdateBotMenuButton) () bool {
if == nil {
return true
}
if !(.BotID == 0) {
return false
}
if !(.Button == nil) {
return false
}
return true
}
func ( *UpdateBotMenuButton) () string {
if == nil {
return "UpdateBotMenuButton(nil)"
}
type UpdateBotMenuButton
return fmt.Sprintf("UpdateBotMenuButton%+v", (*))
}
func ( *UpdateBotMenuButton) ( interface {
() ( int64)
() ( BotMenuButtonClass)
}) {
.BotID = .()
.Button = .()
}
func (*UpdateBotMenuButton) () uint32 {
return UpdateBotMenuButtonTypeID
}
func (*UpdateBotMenuButton) () string {
return "updateBotMenuButton"
}
func ( *UpdateBotMenuButton) () tdp.Type {
:= tdp.Type{
Name: "updateBotMenuButton",
ID: UpdateBotMenuButtonTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "BotID",
SchemaName: "bot_id",
},
{
Name: "Button",
SchemaName: "button",
},
}
return
}
func ( *UpdateBotMenuButton) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotMenuButton#14b85813 as nil")
}
.PutID(UpdateBotMenuButtonTypeID)
return .EncodeBare()
}
func ( *UpdateBotMenuButton) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotMenuButton#14b85813 as nil")
}
.PutLong(.BotID)
if .Button == nil {
return fmt.Errorf("unable to encode updateBotMenuButton#14b85813: field button is nil")
}
if := .Button.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotMenuButton#14b85813: field button: %w", )
}
return nil
}
func ( *UpdateBotMenuButton) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotMenuButton#14b85813 to nil")
}
if := .ConsumeID(UpdateBotMenuButtonTypeID); != nil {
return fmt.Errorf("unable to decode updateBotMenuButton#14b85813: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotMenuButton) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotMenuButton#14b85813 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateBotMenuButton#14b85813: field bot_id: %w", )
}
.BotID =
}
{
, := DecodeBotMenuButton()
if != nil {
return fmt.Errorf("unable to decode updateBotMenuButton#14b85813: field button: %w", )
}
.Button =
}
return nil
}
func ( *UpdateBotMenuButton) () ( int64) {
if == nil {
return
}
return .BotID
}
func ( *UpdateBotMenuButton) () ( BotMenuButtonClass) {
if == nil {
return
}
return .Button
}
type UpdateSavedRingtones struct {
}
const UpdateSavedRingtonesTypeID = 0x74d8be99
func ( UpdateSavedRingtones) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateSavedRingtones{}
_ bin.Decoder = &UpdateSavedRingtones{}
_ bin.BareEncoder = &UpdateSavedRingtones{}
_ bin.BareDecoder = &UpdateSavedRingtones{}
_ UpdateClass = &UpdateSavedRingtones{}
)
func ( *UpdateSavedRingtones) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateSavedRingtones) () string {
if == nil {
return "UpdateSavedRingtones(nil)"
}
type UpdateSavedRingtones
return fmt.Sprintf("UpdateSavedRingtones%+v", (*))
}
func (*UpdateSavedRingtones) () uint32 {
return UpdateSavedRingtonesTypeID
}
func (*UpdateSavedRingtones) () string {
return "updateSavedRingtones"
}
func ( *UpdateSavedRingtones) () tdp.Type {
:= tdp.Type{
Name: "updateSavedRingtones",
ID: UpdateSavedRingtonesTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateSavedRingtones) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateSavedRingtones#74d8be99 as nil")
}
.PutID(UpdateSavedRingtonesTypeID)
return .EncodeBare()
}
func ( *UpdateSavedRingtones) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateSavedRingtones#74d8be99 as nil")
}
return nil
}
func ( *UpdateSavedRingtones) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateSavedRingtones#74d8be99 to nil")
}
if := .ConsumeID(UpdateSavedRingtonesTypeID); != nil {
return fmt.Errorf("unable to decode updateSavedRingtones#74d8be99: %w", )
}
return .DecodeBare()
}
func ( *UpdateSavedRingtones) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateSavedRingtones#74d8be99 to nil")
}
return nil
}
type UpdateTranscribedAudio struct {
Flags bin.Fields
Pending bool
Peer PeerClass
MsgID int
TranscriptionID int64
Text string
}
const UpdateTranscribedAudioTypeID = 0x84cd5a
func ( UpdateTranscribedAudio) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateTranscribedAudio{}
_ bin.Decoder = &UpdateTranscribedAudio{}
_ bin.BareEncoder = &UpdateTranscribedAudio{}
_ bin.BareDecoder = &UpdateTranscribedAudio{}
_ UpdateClass = &UpdateTranscribedAudio{}
)
func ( *UpdateTranscribedAudio) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Pending == false) {
return false
}
if !(.Peer == nil) {
return false
}
if !(.MsgID == 0) {
return false
}
if !(.TranscriptionID == 0) {
return false
}
if !(.Text == "") {
return false
}
return true
}
func ( *UpdateTranscribedAudio) () string {
if == nil {
return "UpdateTranscribedAudio(nil)"
}
type UpdateTranscribedAudio
return fmt.Sprintf("UpdateTranscribedAudio%+v", (*))
}
func ( *UpdateTranscribedAudio) ( interface {
() ( bool)
() ( PeerClass)
() ( int)
() ( int64)
() ( string)
}) {
.Pending = .()
.Peer = .()
.MsgID = .()
.TranscriptionID = .()
.Text = .()
}
func (*UpdateTranscribedAudio) () uint32 {
return UpdateTranscribedAudioTypeID
}
func (*UpdateTranscribedAudio) () string {
return "updateTranscribedAudio"
}
func ( *UpdateTranscribedAudio) () tdp.Type {
:= tdp.Type{
Name: "updateTranscribedAudio",
ID: UpdateTranscribedAudioTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Pending",
SchemaName: "pending",
Null: !.Flags.Has(0),
},
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "MsgID",
SchemaName: "msg_id",
},
{
Name: "TranscriptionID",
SchemaName: "transcription_id",
},
{
Name: "Text",
SchemaName: "text",
},
}
return
}
func ( *UpdateTranscribedAudio) () {
if !(.Pending == false) {
.Flags.Set(0)
}
}
func ( *UpdateTranscribedAudio) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateTranscribedAudio#84cd5a as nil")
}
.PutID(UpdateTranscribedAudioTypeID)
return .EncodeBare()
}
func ( *UpdateTranscribedAudio) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateTranscribedAudio#84cd5a as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateTranscribedAudio#84cd5a: field flags: %w", )
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateTranscribedAudio#84cd5a: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateTranscribedAudio#84cd5a: field peer: %w", )
}
.PutInt(.MsgID)
.PutLong(.TranscriptionID)
.PutString(.Text)
return nil
}
func ( *UpdateTranscribedAudio) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateTranscribedAudio#84cd5a to nil")
}
if := .ConsumeID(UpdateTranscribedAudioTypeID); != nil {
return fmt.Errorf("unable to decode updateTranscribedAudio#84cd5a: %w", )
}
return .DecodeBare()
}
func ( *UpdateTranscribedAudio) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateTranscribedAudio#84cd5a to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateTranscribedAudio#84cd5a: field flags: %w", )
}
}
.Pending = .Flags.Has(0)
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateTranscribedAudio#84cd5a: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateTranscribedAudio#84cd5a: field msg_id: %w", )
}
.MsgID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateTranscribedAudio#84cd5a: field transcription_id: %w", )
}
.TranscriptionID =
}
{
, := .String()
if != nil {
return fmt.Errorf("unable to decode updateTranscribedAudio#84cd5a: field text: %w", )
}
.Text =
}
return nil
}
func ( *UpdateTranscribedAudio) ( bool) {
if {
.Flags.Set(0)
.Pending = true
} else {
.Flags.Unset(0)
.Pending = false
}
}
func ( *UpdateTranscribedAudio) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdateTranscribedAudio) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateTranscribedAudio) () ( int) {
if == nil {
return
}
return .MsgID
}
func ( *UpdateTranscribedAudio) () ( int64) {
if == nil {
return
}
return .TranscriptionID
}
func ( *UpdateTranscribedAudio) () ( string) {
if == nil {
return
}
return .Text
}
type UpdateReadFeaturedEmojiStickers struct {
}
const UpdateReadFeaturedEmojiStickersTypeID = 0xfb4c496c
func ( UpdateReadFeaturedEmojiStickers) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateReadFeaturedEmojiStickers{}
_ bin.Decoder = &UpdateReadFeaturedEmojiStickers{}
_ bin.BareEncoder = &UpdateReadFeaturedEmojiStickers{}
_ bin.BareDecoder = &UpdateReadFeaturedEmojiStickers{}
_ UpdateClass = &UpdateReadFeaturedEmojiStickers{}
)
func ( *UpdateReadFeaturedEmojiStickers) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateReadFeaturedEmojiStickers) () string {
if == nil {
return "UpdateReadFeaturedEmojiStickers(nil)"
}
type UpdateReadFeaturedEmojiStickers
return fmt.Sprintf("UpdateReadFeaturedEmojiStickers%+v", (*))
}
func (*UpdateReadFeaturedEmojiStickers) () uint32 {
return UpdateReadFeaturedEmojiStickersTypeID
}
func (*UpdateReadFeaturedEmojiStickers) () string {
return "updateReadFeaturedEmojiStickers"
}
func ( *UpdateReadFeaturedEmojiStickers) () tdp.Type {
:= tdp.Type{
Name: "updateReadFeaturedEmojiStickers",
ID: UpdateReadFeaturedEmojiStickersTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateReadFeaturedEmojiStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadFeaturedEmojiStickers#fb4c496c as nil")
}
.PutID(UpdateReadFeaturedEmojiStickersTypeID)
return .EncodeBare()
}
func ( *UpdateReadFeaturedEmojiStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadFeaturedEmojiStickers#fb4c496c as nil")
}
return nil
}
func ( *UpdateReadFeaturedEmojiStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadFeaturedEmojiStickers#fb4c496c to nil")
}
if := .ConsumeID(UpdateReadFeaturedEmojiStickersTypeID); != nil {
return fmt.Errorf("unable to decode updateReadFeaturedEmojiStickers#fb4c496c: %w", )
}
return .DecodeBare()
}
func ( *UpdateReadFeaturedEmojiStickers) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadFeaturedEmojiStickers#fb4c496c to nil")
}
return nil
}
type UpdateUserEmojiStatus struct {
UserID int64
EmojiStatus EmojiStatusClass
}
const UpdateUserEmojiStatusTypeID = 0x28373599
func ( UpdateUserEmojiStatus) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateUserEmojiStatus{}
_ bin.Decoder = &UpdateUserEmojiStatus{}
_ bin.BareEncoder = &UpdateUserEmojiStatus{}
_ bin.BareDecoder = &UpdateUserEmojiStatus{}
_ UpdateClass = &UpdateUserEmojiStatus{}
)
func ( *UpdateUserEmojiStatus) () bool {
if == nil {
return true
}
if !(.UserID == 0) {
return false
}
if !(.EmojiStatus == nil) {
return false
}
return true
}
func ( *UpdateUserEmojiStatus) () string {
if == nil {
return "UpdateUserEmojiStatus(nil)"
}
type UpdateUserEmojiStatus
return fmt.Sprintf("UpdateUserEmojiStatus%+v", (*))
}
func ( *UpdateUserEmojiStatus) ( interface {
() ( int64)
() ( EmojiStatusClass)
}) {
.UserID = .()
.EmojiStatus = .()
}
func (*UpdateUserEmojiStatus) () uint32 {
return UpdateUserEmojiStatusTypeID
}
func (*UpdateUserEmojiStatus) () string {
return "updateUserEmojiStatus"
}
func ( *UpdateUserEmojiStatus) () tdp.Type {
:= tdp.Type{
Name: "updateUserEmojiStatus",
ID: UpdateUserEmojiStatusTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "UserID",
SchemaName: "user_id",
},
{
Name: "EmojiStatus",
SchemaName: "emoji_status",
},
}
return
}
func ( *UpdateUserEmojiStatus) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateUserEmojiStatus#28373599 as nil")
}
.PutID(UpdateUserEmojiStatusTypeID)
return .EncodeBare()
}
func ( *UpdateUserEmojiStatus) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateUserEmojiStatus#28373599 as nil")
}
.PutLong(.UserID)
if .EmojiStatus == nil {
return fmt.Errorf("unable to encode updateUserEmojiStatus#28373599: field emoji_status is nil")
}
if := .EmojiStatus.Encode(); != nil {
return fmt.Errorf("unable to encode updateUserEmojiStatus#28373599: field emoji_status: %w", )
}
return nil
}
func ( *UpdateUserEmojiStatus) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateUserEmojiStatus#28373599 to nil")
}
if := .ConsumeID(UpdateUserEmojiStatusTypeID); != nil {
return fmt.Errorf("unable to decode updateUserEmojiStatus#28373599: %w", )
}
return .DecodeBare()
}
func ( *UpdateUserEmojiStatus) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateUserEmojiStatus#28373599 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateUserEmojiStatus#28373599: field user_id: %w", )
}
.UserID =
}
{
, := DecodeEmojiStatus()
if != nil {
return fmt.Errorf("unable to decode updateUserEmojiStatus#28373599: field emoji_status: %w", )
}
.EmojiStatus =
}
return nil
}
func ( *UpdateUserEmojiStatus) () ( int64) {
if == nil {
return
}
return .UserID
}
func ( *UpdateUserEmojiStatus) () ( EmojiStatusClass) {
if == nil {
return
}
return .EmojiStatus
}
type UpdateRecentEmojiStatuses struct {
}
const UpdateRecentEmojiStatusesTypeID = 0x30f443db
func ( UpdateRecentEmojiStatuses) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateRecentEmojiStatuses{}
_ bin.Decoder = &UpdateRecentEmojiStatuses{}
_ bin.BareEncoder = &UpdateRecentEmojiStatuses{}
_ bin.BareDecoder = &UpdateRecentEmojiStatuses{}
_ UpdateClass = &UpdateRecentEmojiStatuses{}
)
func ( *UpdateRecentEmojiStatuses) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateRecentEmojiStatuses) () string {
if == nil {
return "UpdateRecentEmojiStatuses(nil)"
}
type UpdateRecentEmojiStatuses
return fmt.Sprintf("UpdateRecentEmojiStatuses%+v", (*))
}
func (*UpdateRecentEmojiStatuses) () uint32 {
return UpdateRecentEmojiStatusesTypeID
}
func (*UpdateRecentEmojiStatuses) () string {
return "updateRecentEmojiStatuses"
}
func ( *UpdateRecentEmojiStatuses) () tdp.Type {
:= tdp.Type{
Name: "updateRecentEmojiStatuses",
ID: UpdateRecentEmojiStatusesTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateRecentEmojiStatuses) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateRecentEmojiStatuses#30f443db as nil")
}
.PutID(UpdateRecentEmojiStatusesTypeID)
return .EncodeBare()
}
func ( *UpdateRecentEmojiStatuses) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateRecentEmojiStatuses#30f443db as nil")
}
return nil
}
func ( *UpdateRecentEmojiStatuses) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateRecentEmojiStatuses#30f443db to nil")
}
if := .ConsumeID(UpdateRecentEmojiStatusesTypeID); != nil {
return fmt.Errorf("unable to decode updateRecentEmojiStatuses#30f443db: %w", )
}
return .DecodeBare()
}
func ( *UpdateRecentEmojiStatuses) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateRecentEmojiStatuses#30f443db to nil")
}
return nil
}
type UpdateRecentReactions struct {
}
const UpdateRecentReactionsTypeID = 0x6f7863f4
func ( UpdateRecentReactions) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateRecentReactions{}
_ bin.Decoder = &UpdateRecentReactions{}
_ bin.BareEncoder = &UpdateRecentReactions{}
_ bin.BareDecoder = &UpdateRecentReactions{}
_ UpdateClass = &UpdateRecentReactions{}
)
func ( *UpdateRecentReactions) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateRecentReactions) () string {
if == nil {
return "UpdateRecentReactions(nil)"
}
type UpdateRecentReactions
return fmt.Sprintf("UpdateRecentReactions%+v", (*))
}
func (*UpdateRecentReactions) () uint32 {
return UpdateRecentReactionsTypeID
}
func (*UpdateRecentReactions) () string {
return "updateRecentReactions"
}
func ( *UpdateRecentReactions) () tdp.Type {
:= tdp.Type{
Name: "updateRecentReactions",
ID: UpdateRecentReactionsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateRecentReactions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateRecentReactions#6f7863f4 as nil")
}
.PutID(UpdateRecentReactionsTypeID)
return .EncodeBare()
}
func ( *UpdateRecentReactions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateRecentReactions#6f7863f4 as nil")
}
return nil
}
func ( *UpdateRecentReactions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateRecentReactions#6f7863f4 to nil")
}
if := .ConsumeID(UpdateRecentReactionsTypeID); != nil {
return fmt.Errorf("unable to decode updateRecentReactions#6f7863f4: %w", )
}
return .DecodeBare()
}
func ( *UpdateRecentReactions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateRecentReactions#6f7863f4 to nil")
}
return nil
}
type UpdateMoveStickerSetToTop struct {
Flags bin.Fields
Masks bool
Emojis bool
Stickerset int64
}
const UpdateMoveStickerSetToTopTypeID = 0x86fccf85
func ( UpdateMoveStickerSetToTop) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateMoveStickerSetToTop{}
_ bin.Decoder = &UpdateMoveStickerSetToTop{}
_ bin.BareEncoder = &UpdateMoveStickerSetToTop{}
_ bin.BareDecoder = &UpdateMoveStickerSetToTop{}
_ UpdateClass = &UpdateMoveStickerSetToTop{}
)
func ( *UpdateMoveStickerSetToTop) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Masks == false) {
return false
}
if !(.Emojis == false) {
return false
}
if !(.Stickerset == 0) {
return false
}
return true
}
func ( *UpdateMoveStickerSetToTop) () string {
if == nil {
return "UpdateMoveStickerSetToTop(nil)"
}
type UpdateMoveStickerSetToTop
return fmt.Sprintf("UpdateMoveStickerSetToTop%+v", (*))
}
func ( *UpdateMoveStickerSetToTop) ( interface {
() ( bool)
() ( bool)
() ( int64)
}) {
.Masks = .()
.Emojis = .()
.Stickerset = .()
}
func (*UpdateMoveStickerSetToTop) () uint32 {
return UpdateMoveStickerSetToTopTypeID
}
func (*UpdateMoveStickerSetToTop) () string {
return "updateMoveStickerSetToTop"
}
func ( *UpdateMoveStickerSetToTop) () tdp.Type {
:= tdp.Type{
Name: "updateMoveStickerSetToTop",
ID: UpdateMoveStickerSetToTopTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Masks",
SchemaName: "masks",
Null: !.Flags.Has(0),
},
{
Name: "Emojis",
SchemaName: "emojis",
Null: !.Flags.Has(1),
},
{
Name: "Stickerset",
SchemaName: "stickerset",
},
}
return
}
func ( *UpdateMoveStickerSetToTop) () {
if !(.Masks == false) {
.Flags.Set(0)
}
if !(.Emojis == false) {
.Flags.Set(1)
}
}
func ( *UpdateMoveStickerSetToTop) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateMoveStickerSetToTop#86fccf85 as nil")
}
.PutID(UpdateMoveStickerSetToTopTypeID)
return .EncodeBare()
}
func ( *UpdateMoveStickerSetToTop) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateMoveStickerSetToTop#86fccf85 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateMoveStickerSetToTop#86fccf85: field flags: %w", )
}
.PutLong(.Stickerset)
return nil
}
func ( *UpdateMoveStickerSetToTop) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateMoveStickerSetToTop#86fccf85 to nil")
}
if := .ConsumeID(UpdateMoveStickerSetToTopTypeID); != nil {
return fmt.Errorf("unable to decode updateMoveStickerSetToTop#86fccf85: %w", )
}
return .DecodeBare()
}
func ( *UpdateMoveStickerSetToTop) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateMoveStickerSetToTop#86fccf85 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateMoveStickerSetToTop#86fccf85: field flags: %w", )
}
}
.Masks = .Flags.Has(0)
.Emojis = .Flags.Has(1)
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateMoveStickerSetToTop#86fccf85: field stickerset: %w", )
}
.Stickerset =
}
return nil
}
func ( *UpdateMoveStickerSetToTop) ( bool) {
if {
.Flags.Set(0)
.Masks = true
} else {
.Flags.Unset(0)
.Masks = false
}
}
func ( *UpdateMoveStickerSetToTop) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdateMoveStickerSetToTop) ( bool) {
if {
.Flags.Set(1)
.Emojis = true
} else {
.Flags.Unset(1)
.Emojis = false
}
}
func ( *UpdateMoveStickerSetToTop) () ( bool) {
if == nil {
return
}
return .Flags.Has(1)
}
func ( *UpdateMoveStickerSetToTop) () ( int64) {
if == nil {
return
}
return .Stickerset
}
type UpdateMessageExtendedMedia struct {
Peer PeerClass
MsgID int
ExtendedMedia MessageExtendedMediaClass
}
const UpdateMessageExtendedMediaTypeID = 0x5a73a98c
func ( UpdateMessageExtendedMedia) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateMessageExtendedMedia{}
_ bin.Decoder = &UpdateMessageExtendedMedia{}
_ bin.BareEncoder = &UpdateMessageExtendedMedia{}
_ bin.BareDecoder = &UpdateMessageExtendedMedia{}
_ UpdateClass = &UpdateMessageExtendedMedia{}
)
func ( *UpdateMessageExtendedMedia) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.MsgID == 0) {
return false
}
if !(.ExtendedMedia == nil) {
return false
}
return true
}
func ( *UpdateMessageExtendedMedia) () string {
if == nil {
return "UpdateMessageExtendedMedia(nil)"
}
type UpdateMessageExtendedMedia
return fmt.Sprintf("UpdateMessageExtendedMedia%+v", (*))
}
func ( *UpdateMessageExtendedMedia) ( interface {
() ( PeerClass)
() ( int)
() ( MessageExtendedMediaClass)
}) {
.Peer = .()
.MsgID = .()
.ExtendedMedia = .()
}
func (*UpdateMessageExtendedMedia) () uint32 {
return UpdateMessageExtendedMediaTypeID
}
func (*UpdateMessageExtendedMedia) () string {
return "updateMessageExtendedMedia"
}
func ( *UpdateMessageExtendedMedia) () tdp.Type {
:= tdp.Type{
Name: "updateMessageExtendedMedia",
ID: UpdateMessageExtendedMediaTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "MsgID",
SchemaName: "msg_id",
},
{
Name: "ExtendedMedia",
SchemaName: "extended_media",
},
}
return
}
func ( *UpdateMessageExtendedMedia) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateMessageExtendedMedia#5a73a98c as nil")
}
.PutID(UpdateMessageExtendedMediaTypeID)
return .EncodeBare()
}
func ( *UpdateMessageExtendedMedia) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateMessageExtendedMedia#5a73a98c as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateMessageExtendedMedia#5a73a98c: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateMessageExtendedMedia#5a73a98c: field peer: %w", )
}
.PutInt(.MsgID)
if .ExtendedMedia == nil {
return fmt.Errorf("unable to encode updateMessageExtendedMedia#5a73a98c: field extended_media is nil")
}
if := .ExtendedMedia.Encode(); != nil {
return fmt.Errorf("unable to encode updateMessageExtendedMedia#5a73a98c: field extended_media: %w", )
}
return nil
}
func ( *UpdateMessageExtendedMedia) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateMessageExtendedMedia#5a73a98c to nil")
}
if := .ConsumeID(UpdateMessageExtendedMediaTypeID); != nil {
return fmt.Errorf("unable to decode updateMessageExtendedMedia#5a73a98c: %w", )
}
return .DecodeBare()
}
func ( *UpdateMessageExtendedMedia) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateMessageExtendedMedia#5a73a98c to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateMessageExtendedMedia#5a73a98c: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateMessageExtendedMedia#5a73a98c: field msg_id: %w", )
}
.MsgID =
}
{
, := DecodeMessageExtendedMedia()
if != nil {
return fmt.Errorf("unable to decode updateMessageExtendedMedia#5a73a98c: field extended_media: %w", )
}
.ExtendedMedia =
}
return nil
}
func ( *UpdateMessageExtendedMedia) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateMessageExtendedMedia) () ( int) {
if == nil {
return
}
return .MsgID
}
func ( *UpdateMessageExtendedMedia) () ( MessageExtendedMediaClass) {
if == nil {
return
}
return .ExtendedMedia
}
type UpdateChannelPinnedTopic struct {
Flags bin.Fields
Pinned bool
ChannelID int64
TopicID int
}
const UpdateChannelPinnedTopicTypeID = 0x192efbe3
func ( UpdateChannelPinnedTopic) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChannelPinnedTopic{}
_ bin.Decoder = &UpdateChannelPinnedTopic{}
_ bin.BareEncoder = &UpdateChannelPinnedTopic{}
_ bin.BareDecoder = &UpdateChannelPinnedTopic{}
_ UpdateClass = &UpdateChannelPinnedTopic{}
)
func ( *UpdateChannelPinnedTopic) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.Pinned == false) {
return false
}
if !(.ChannelID == 0) {
return false
}
if !(.TopicID == 0) {
return false
}
return true
}
func ( *UpdateChannelPinnedTopic) () string {
if == nil {
return "UpdateChannelPinnedTopic(nil)"
}
type UpdateChannelPinnedTopic
return fmt.Sprintf("UpdateChannelPinnedTopic%+v", (*))
}
func ( *UpdateChannelPinnedTopic) ( interface {
() ( bool)
() ( int64)
() ( int)
}) {
.Pinned = .()
.ChannelID = .()
.TopicID = .()
}
func (*UpdateChannelPinnedTopic) () uint32 {
return UpdateChannelPinnedTopicTypeID
}
func (*UpdateChannelPinnedTopic) () string {
return "updateChannelPinnedTopic"
}
func ( *UpdateChannelPinnedTopic) () tdp.Type {
:= tdp.Type{
Name: "updateChannelPinnedTopic",
ID: UpdateChannelPinnedTopicTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Pinned",
SchemaName: "pinned",
Null: !.Flags.Has(0),
},
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "TopicID",
SchemaName: "topic_id",
},
}
return
}
func ( *UpdateChannelPinnedTopic) () {
if !(.Pinned == false) {
.Flags.Set(0)
}
}
func ( *UpdateChannelPinnedTopic) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelPinnedTopic#192efbe3 as nil")
}
.PutID(UpdateChannelPinnedTopicTypeID)
return .EncodeBare()
}
func ( *UpdateChannelPinnedTopic) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelPinnedTopic#192efbe3 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateChannelPinnedTopic#192efbe3: field flags: %w", )
}
.PutLong(.ChannelID)
.PutInt(.TopicID)
return nil
}
func ( *UpdateChannelPinnedTopic) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelPinnedTopic#192efbe3 to nil")
}
if := .ConsumeID(UpdateChannelPinnedTopicTypeID); != nil {
return fmt.Errorf("unable to decode updateChannelPinnedTopic#192efbe3: %w", )
}
return .DecodeBare()
}
func ( *UpdateChannelPinnedTopic) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelPinnedTopic#192efbe3 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateChannelPinnedTopic#192efbe3: field flags: %w", )
}
}
.Pinned = .Flags.Has(0)
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelPinnedTopic#192efbe3: field channel_id: %w", )
}
.ChannelID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelPinnedTopic#192efbe3: field topic_id: %w", )
}
.TopicID =
}
return nil
}
func ( *UpdateChannelPinnedTopic) ( bool) {
if {
.Flags.Set(0)
.Pinned = true
} else {
.Flags.Unset(0)
.Pinned = false
}
}
func ( *UpdateChannelPinnedTopic) () ( bool) {
if == nil {
return
}
return .Flags.Has(0)
}
func ( *UpdateChannelPinnedTopic) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateChannelPinnedTopic) () ( int) {
if == nil {
return
}
return .TopicID
}
type UpdateChannelPinnedTopics struct {
Flags bin.Fields
ChannelID int64
Order []int
}
const UpdateChannelPinnedTopicsTypeID = 0xfe198602
func ( UpdateChannelPinnedTopics) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChannelPinnedTopics{}
_ bin.Decoder = &UpdateChannelPinnedTopics{}
_ bin.BareEncoder = &UpdateChannelPinnedTopics{}
_ bin.BareDecoder = &UpdateChannelPinnedTopics{}
_ UpdateClass = &UpdateChannelPinnedTopics{}
)
func ( *UpdateChannelPinnedTopics) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.ChannelID == 0) {
return false
}
if !(.Order == nil) {
return false
}
return true
}
func ( *UpdateChannelPinnedTopics) () string {
if == nil {
return "UpdateChannelPinnedTopics(nil)"
}
type UpdateChannelPinnedTopics
return fmt.Sprintf("UpdateChannelPinnedTopics%+v", (*))
}
func ( *UpdateChannelPinnedTopics) ( interface {
() ( int64)
() ( []int, bool)
}) {
.ChannelID = .()
if , := .(); {
.Order =
}
}
func (*UpdateChannelPinnedTopics) () uint32 {
return UpdateChannelPinnedTopicsTypeID
}
func (*UpdateChannelPinnedTopics) () string {
return "updateChannelPinnedTopics"
}
func ( *UpdateChannelPinnedTopics) () tdp.Type {
:= tdp.Type{
Name: "updateChannelPinnedTopics",
ID: UpdateChannelPinnedTopicsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "Order",
SchemaName: "order",
Null: !.Flags.Has(0),
},
}
return
}
func ( *UpdateChannelPinnedTopics) () {
if !(.Order == nil) {
.Flags.Set(0)
}
}
func ( *UpdateChannelPinnedTopics) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelPinnedTopics#fe198602 as nil")
}
.PutID(UpdateChannelPinnedTopicsTypeID)
return .EncodeBare()
}
func ( *UpdateChannelPinnedTopics) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelPinnedTopics#fe198602 as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updateChannelPinnedTopics#fe198602: field flags: %w", )
}
.PutLong(.ChannelID)
if .Flags.Has(0) {
.PutVectorHeader(len(.Order))
for , := range .Order {
.PutInt()
}
}
return nil
}
func ( *UpdateChannelPinnedTopics) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelPinnedTopics#fe198602 to nil")
}
if := .ConsumeID(UpdateChannelPinnedTopicsTypeID); != nil {
return fmt.Errorf("unable to decode updateChannelPinnedTopics#fe198602: %w", )
}
return .DecodeBare()
}
func ( *UpdateChannelPinnedTopics) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelPinnedTopics#fe198602 to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updateChannelPinnedTopics#fe198602: field flags: %w", )
}
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelPinnedTopics#fe198602: field channel_id: %w", )
}
.ChannelID =
}
if .Flags.Has(0) {
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateChannelPinnedTopics#fe198602: field order: %w", )
}
if > 0 {
.Order = make([]int, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateChannelPinnedTopics#fe198602: field order: %w", )
}
.Order = append(.Order, )
}
}
return nil
}
func ( *UpdateChannelPinnedTopics) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateChannelPinnedTopics) ( []int) {
.Flags.Set(0)
.Order =
}
func ( *UpdateChannelPinnedTopics) () ( []int, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Order, true
}
type UpdateUser struct {
UserID int64
}
const UpdateUserTypeID = 0x20529438
func ( UpdateUser) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateUser{}
_ bin.Decoder = &UpdateUser{}
_ bin.BareEncoder = &UpdateUser{}
_ bin.BareDecoder = &UpdateUser{}
_ UpdateClass = &UpdateUser{}
)
func ( *UpdateUser) () bool {
if == nil {
return true
}
if !(.UserID == 0) {
return false
}
return true
}
func ( *UpdateUser) () string {
if == nil {
return "UpdateUser(nil)"
}
type UpdateUser
return fmt.Sprintf("UpdateUser%+v", (*))
}
func ( *UpdateUser) ( interface {
() ( int64)
}) {
.UserID = .()
}
func (*UpdateUser) () uint32 {
return UpdateUserTypeID
}
func (*UpdateUser) () string {
return "updateUser"
}
func ( *UpdateUser) () tdp.Type {
:= tdp.Type{
Name: "updateUser",
ID: UpdateUserTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "UserID",
SchemaName: "user_id",
},
}
return
}
func ( *UpdateUser) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateUser#20529438 as nil")
}
.PutID(UpdateUserTypeID)
return .EncodeBare()
}
func ( *UpdateUser) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateUser#20529438 as nil")
}
.PutLong(.UserID)
return nil
}
func ( *UpdateUser) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateUser#20529438 to nil")
}
if := .ConsumeID(UpdateUserTypeID); != nil {
return fmt.Errorf("unable to decode updateUser#20529438: %w", )
}
return .DecodeBare()
}
func ( *UpdateUser) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateUser#20529438 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateUser#20529438: field user_id: %w", )
}
.UserID =
}
return nil
}
func ( *UpdateUser) () ( int64) {
if == nil {
return
}
return .UserID
}
type UpdateAutoSaveSettings struct {
}
const UpdateAutoSaveSettingsTypeID = 0xec05b097
func ( UpdateAutoSaveSettings) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateAutoSaveSettings{}
_ bin.Decoder = &UpdateAutoSaveSettings{}
_ bin.BareEncoder = &UpdateAutoSaveSettings{}
_ bin.BareDecoder = &UpdateAutoSaveSettings{}
_ UpdateClass = &UpdateAutoSaveSettings{}
)
func ( *UpdateAutoSaveSettings) () bool {
if == nil {
return true
}
return true
}
func ( *UpdateAutoSaveSettings) () string {
if == nil {
return "UpdateAutoSaveSettings(nil)"
}
type UpdateAutoSaveSettings
return fmt.Sprintf("UpdateAutoSaveSettings%+v", (*))
}
func (*UpdateAutoSaveSettings) () uint32 {
return UpdateAutoSaveSettingsTypeID
}
func (*UpdateAutoSaveSettings) () string {
return "updateAutoSaveSettings"
}
func ( *UpdateAutoSaveSettings) () tdp.Type {
:= tdp.Type{
Name: "updateAutoSaveSettings",
ID: UpdateAutoSaveSettingsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{}
return
}
func ( *UpdateAutoSaveSettings) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateAutoSaveSettings#ec05b097 as nil")
}
.PutID(UpdateAutoSaveSettingsTypeID)
return .EncodeBare()
}
func ( *UpdateAutoSaveSettings) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateAutoSaveSettings#ec05b097 as nil")
}
return nil
}
func ( *UpdateAutoSaveSettings) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateAutoSaveSettings#ec05b097 to nil")
}
if := .ConsumeID(UpdateAutoSaveSettingsTypeID); != nil {
return fmt.Errorf("unable to decode updateAutoSaveSettings#ec05b097: %w", )
}
return .DecodeBare()
}
func ( *UpdateAutoSaveSettings) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateAutoSaveSettings#ec05b097 to nil")
}
return nil
}
type UpdateGroupInvitePrivacyForbidden struct {
UserID int64
}
const UpdateGroupInvitePrivacyForbiddenTypeID = 0xccf08ad6
func ( UpdateGroupInvitePrivacyForbidden) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateGroupInvitePrivacyForbidden{}
_ bin.Decoder = &UpdateGroupInvitePrivacyForbidden{}
_ bin.BareEncoder = &UpdateGroupInvitePrivacyForbidden{}
_ bin.BareDecoder = &UpdateGroupInvitePrivacyForbidden{}
_ UpdateClass = &UpdateGroupInvitePrivacyForbidden{}
)
func ( *UpdateGroupInvitePrivacyForbidden) () bool {
if == nil {
return true
}
if !(.UserID == 0) {
return false
}
return true
}
func ( *UpdateGroupInvitePrivacyForbidden) () string {
if == nil {
return "UpdateGroupInvitePrivacyForbidden(nil)"
}
type UpdateGroupInvitePrivacyForbidden
return fmt.Sprintf("UpdateGroupInvitePrivacyForbidden%+v", (*))
}
func ( *UpdateGroupInvitePrivacyForbidden) ( interface {
() ( int64)
}) {
.UserID = .()
}
func (*UpdateGroupInvitePrivacyForbidden) () uint32 {
return UpdateGroupInvitePrivacyForbiddenTypeID
}
func (*UpdateGroupInvitePrivacyForbidden) () string {
return "updateGroupInvitePrivacyForbidden"
}
func ( *UpdateGroupInvitePrivacyForbidden) () tdp.Type {
:= tdp.Type{
Name: "updateGroupInvitePrivacyForbidden",
ID: UpdateGroupInvitePrivacyForbiddenTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "UserID",
SchemaName: "user_id",
},
}
return
}
func ( *UpdateGroupInvitePrivacyForbidden) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateGroupInvitePrivacyForbidden#ccf08ad6 as nil")
}
.PutID(UpdateGroupInvitePrivacyForbiddenTypeID)
return .EncodeBare()
}
func ( *UpdateGroupInvitePrivacyForbidden) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateGroupInvitePrivacyForbidden#ccf08ad6 as nil")
}
.PutLong(.UserID)
return nil
}
func ( *UpdateGroupInvitePrivacyForbidden) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateGroupInvitePrivacyForbidden#ccf08ad6 to nil")
}
if := .ConsumeID(UpdateGroupInvitePrivacyForbiddenTypeID); != nil {
return fmt.Errorf("unable to decode updateGroupInvitePrivacyForbidden#ccf08ad6: %w", )
}
return .DecodeBare()
}
func ( *UpdateGroupInvitePrivacyForbidden) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateGroupInvitePrivacyForbidden#ccf08ad6 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateGroupInvitePrivacyForbidden#ccf08ad6: field user_id: %w", )
}
.UserID =
}
return nil
}
func ( *UpdateGroupInvitePrivacyForbidden) () ( int64) {
if == nil {
return
}
return .UserID
}
type UpdateStory struct {
Peer PeerClass
Story StoryItemClass
}
const UpdateStoryTypeID = 0x75b3b798
func ( UpdateStory) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateStory{}
_ bin.Decoder = &UpdateStory{}
_ bin.BareEncoder = &UpdateStory{}
_ bin.BareDecoder = &UpdateStory{}
_ UpdateClass = &UpdateStory{}
)
func ( *UpdateStory) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.Story == nil) {
return false
}
return true
}
func ( *UpdateStory) () string {
if == nil {
return "UpdateStory(nil)"
}
type UpdateStory
return fmt.Sprintf("UpdateStory%+v", (*))
}
func ( *UpdateStory) ( interface {
() ( PeerClass)
() ( StoryItemClass)
}) {
.Peer = .()
.Story = .()
}
func (*UpdateStory) () uint32 {
return UpdateStoryTypeID
}
func (*UpdateStory) () string {
return "updateStory"
}
func ( *UpdateStory) () tdp.Type {
:= tdp.Type{
Name: "updateStory",
ID: UpdateStoryTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "Story",
SchemaName: "story",
},
}
return
}
func ( *UpdateStory) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateStory#75b3b798 as nil")
}
.PutID(UpdateStoryTypeID)
return .EncodeBare()
}
func ( *UpdateStory) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateStory#75b3b798 as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateStory#75b3b798: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateStory#75b3b798: field peer: %w", )
}
if .Story == nil {
return fmt.Errorf("unable to encode updateStory#75b3b798: field story is nil")
}
if := .Story.Encode(); != nil {
return fmt.Errorf("unable to encode updateStory#75b3b798: field story: %w", )
}
return nil
}
func ( *UpdateStory) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateStory#75b3b798 to nil")
}
if := .ConsumeID(UpdateStoryTypeID); != nil {
return fmt.Errorf("unable to decode updateStory#75b3b798: %w", )
}
return .DecodeBare()
}
func ( *UpdateStory) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateStory#75b3b798 to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateStory#75b3b798: field peer: %w", )
}
.Peer =
}
{
, := DecodeStoryItem()
if != nil {
return fmt.Errorf("unable to decode updateStory#75b3b798: field story: %w", )
}
.Story =
}
return nil
}
func ( *UpdateStory) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateStory) () ( StoryItemClass) {
if == nil {
return
}
return .Story
}
type UpdateReadStories struct {
Peer PeerClass
MaxID int
}
const UpdateReadStoriesTypeID = 0xf74e932b
func ( UpdateReadStories) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateReadStories{}
_ bin.Decoder = &UpdateReadStories{}
_ bin.BareEncoder = &UpdateReadStories{}
_ bin.BareDecoder = &UpdateReadStories{}
_ UpdateClass = &UpdateReadStories{}
)
func ( *UpdateReadStories) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.MaxID == 0) {
return false
}
return true
}
func ( *UpdateReadStories) () string {
if == nil {
return "UpdateReadStories(nil)"
}
type UpdateReadStories
return fmt.Sprintf("UpdateReadStories%+v", (*))
}
func ( *UpdateReadStories) ( interface {
() ( PeerClass)
() ( int)
}) {
.Peer = .()
.MaxID = .()
}
func (*UpdateReadStories) () uint32 {
return UpdateReadStoriesTypeID
}
func (*UpdateReadStories) () string {
return "updateReadStories"
}
func ( *UpdateReadStories) () tdp.Type {
:= tdp.Type{
Name: "updateReadStories",
ID: UpdateReadStoriesTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "MaxID",
SchemaName: "max_id",
},
}
return
}
func ( *UpdateReadStories) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadStories#f74e932b as nil")
}
.PutID(UpdateReadStoriesTypeID)
return .EncodeBare()
}
func ( *UpdateReadStories) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateReadStories#f74e932b as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateReadStories#f74e932b: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateReadStories#f74e932b: field peer: %w", )
}
.PutInt(.MaxID)
return nil
}
func ( *UpdateReadStories) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadStories#f74e932b to nil")
}
if := .ConsumeID(UpdateReadStoriesTypeID); != nil {
return fmt.Errorf("unable to decode updateReadStories#f74e932b: %w", )
}
return .DecodeBare()
}
func ( *UpdateReadStories) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateReadStories#f74e932b to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateReadStories#f74e932b: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateReadStories#f74e932b: field max_id: %w", )
}
.MaxID =
}
return nil
}
func ( *UpdateReadStories) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateReadStories) () ( int) {
if == nil {
return
}
return .MaxID
}
type UpdateStoryID struct {
ID int
RandomID int64
}
const UpdateStoryIDTypeID = 0x1bf335b9
func ( UpdateStoryID) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateStoryID{}
_ bin.Decoder = &UpdateStoryID{}
_ bin.BareEncoder = &UpdateStoryID{}
_ bin.BareDecoder = &UpdateStoryID{}
_ UpdateClass = &UpdateStoryID{}
)
func ( *UpdateStoryID) () bool {
if == nil {
return true
}
if !(.ID == 0) {
return false
}
if !(.RandomID == 0) {
return false
}
return true
}
func ( *UpdateStoryID) () string {
if == nil {
return "UpdateStoryID(nil)"
}
type UpdateStoryID
return fmt.Sprintf("UpdateStoryID%+v", (*))
}
func ( *UpdateStoryID) ( interface {
() ( int)
() ( int64)
}) {
.ID = .()
.RandomID = .()
}
func (*UpdateStoryID) () uint32 {
return UpdateStoryIDTypeID
}
func (*UpdateStoryID) () string {
return "updateStoryID"
}
func ( *UpdateStoryID) () tdp.Type {
:= tdp.Type{
Name: "updateStoryID",
ID: UpdateStoryIDTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ID",
SchemaName: "id",
},
{
Name: "RandomID",
SchemaName: "random_id",
},
}
return
}
func ( *UpdateStoryID) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateStoryID#1bf335b9 as nil")
}
.PutID(UpdateStoryIDTypeID)
return .EncodeBare()
}
func ( *UpdateStoryID) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateStoryID#1bf335b9 as nil")
}
.PutInt(.ID)
.PutLong(.RandomID)
return nil
}
func ( *UpdateStoryID) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateStoryID#1bf335b9 to nil")
}
if := .ConsumeID(UpdateStoryIDTypeID); != nil {
return fmt.Errorf("unable to decode updateStoryID#1bf335b9: %w", )
}
return .DecodeBare()
}
func ( *UpdateStoryID) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateStoryID#1bf335b9 to nil")
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateStoryID#1bf335b9: field id: %w", )
}
.ID =
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateStoryID#1bf335b9: field random_id: %w", )
}
.RandomID =
}
return nil
}
func ( *UpdateStoryID) () ( int) {
if == nil {
return
}
return .ID
}
func ( *UpdateStoryID) () ( int64) {
if == nil {
return
}
return .RandomID
}
type UpdateStoriesStealthMode struct {
StealthMode StoriesStealthMode
}
const UpdateStoriesStealthModeTypeID = 0x2c084dc1
func ( UpdateStoriesStealthMode) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateStoriesStealthMode{}
_ bin.Decoder = &UpdateStoriesStealthMode{}
_ bin.BareEncoder = &UpdateStoriesStealthMode{}
_ bin.BareDecoder = &UpdateStoriesStealthMode{}
_ UpdateClass = &UpdateStoriesStealthMode{}
)
func ( *UpdateStoriesStealthMode) () bool {
if == nil {
return true
}
if !(.StealthMode.Zero()) {
return false
}
return true
}
func ( *UpdateStoriesStealthMode) () string {
if == nil {
return "UpdateStoriesStealthMode(nil)"
}
type UpdateStoriesStealthMode
return fmt.Sprintf("UpdateStoriesStealthMode%+v", (*))
}
func ( *UpdateStoriesStealthMode) ( interface {
() ( StoriesStealthMode)
}) {
.StealthMode = .()
}
func (*UpdateStoriesStealthMode) () uint32 {
return UpdateStoriesStealthModeTypeID
}
func (*UpdateStoriesStealthMode) () string {
return "updateStoriesStealthMode"
}
func ( *UpdateStoriesStealthMode) () tdp.Type {
:= tdp.Type{
Name: "updateStoriesStealthMode",
ID: UpdateStoriesStealthModeTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "StealthMode",
SchemaName: "stealth_mode",
},
}
return
}
func ( *UpdateStoriesStealthMode) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateStoriesStealthMode#2c084dc1 as nil")
}
.PutID(UpdateStoriesStealthModeTypeID)
return .EncodeBare()
}
func ( *UpdateStoriesStealthMode) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateStoriesStealthMode#2c084dc1 as nil")
}
if := .StealthMode.Encode(); != nil {
return fmt.Errorf("unable to encode updateStoriesStealthMode#2c084dc1: field stealth_mode: %w", )
}
return nil
}
func ( *UpdateStoriesStealthMode) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateStoriesStealthMode#2c084dc1 to nil")
}
if := .ConsumeID(UpdateStoriesStealthModeTypeID); != nil {
return fmt.Errorf("unable to decode updateStoriesStealthMode#2c084dc1: %w", )
}
return .DecodeBare()
}
func ( *UpdateStoriesStealthMode) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateStoriesStealthMode#2c084dc1 to nil")
}
{
if := .StealthMode.Decode(); != nil {
return fmt.Errorf("unable to decode updateStoriesStealthMode#2c084dc1: field stealth_mode: %w", )
}
}
return nil
}
func ( *UpdateStoriesStealthMode) () ( StoriesStealthMode) {
if == nil {
return
}
return .StealthMode
}
type UpdateSentStoryReaction struct {
Peer PeerClass
StoryID int
Reaction ReactionClass
}
const UpdateSentStoryReactionTypeID = 0x7d627683
func ( UpdateSentStoryReaction) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateSentStoryReaction{}
_ bin.Decoder = &UpdateSentStoryReaction{}
_ bin.BareEncoder = &UpdateSentStoryReaction{}
_ bin.BareDecoder = &UpdateSentStoryReaction{}
_ UpdateClass = &UpdateSentStoryReaction{}
)
func ( *UpdateSentStoryReaction) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.StoryID == 0) {
return false
}
if !(.Reaction == nil) {
return false
}
return true
}
func ( *UpdateSentStoryReaction) () string {
if == nil {
return "UpdateSentStoryReaction(nil)"
}
type UpdateSentStoryReaction
return fmt.Sprintf("UpdateSentStoryReaction%+v", (*))
}
func ( *UpdateSentStoryReaction) ( interface {
() ( PeerClass)
() ( int)
() ( ReactionClass)
}) {
.Peer = .()
.StoryID = .()
.Reaction = .()
}
func (*UpdateSentStoryReaction) () uint32 {
return UpdateSentStoryReactionTypeID
}
func (*UpdateSentStoryReaction) () string {
return "updateSentStoryReaction"
}
func ( *UpdateSentStoryReaction) () tdp.Type {
:= tdp.Type{
Name: "updateSentStoryReaction",
ID: UpdateSentStoryReactionTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "StoryID",
SchemaName: "story_id",
},
{
Name: "Reaction",
SchemaName: "reaction",
},
}
return
}
func ( *UpdateSentStoryReaction) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateSentStoryReaction#7d627683 as nil")
}
.PutID(UpdateSentStoryReactionTypeID)
return .EncodeBare()
}
func ( *UpdateSentStoryReaction) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateSentStoryReaction#7d627683 as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateSentStoryReaction#7d627683: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateSentStoryReaction#7d627683: field peer: %w", )
}
.PutInt(.StoryID)
if .Reaction == nil {
return fmt.Errorf("unable to encode updateSentStoryReaction#7d627683: field reaction is nil")
}
if := .Reaction.Encode(); != nil {
return fmt.Errorf("unable to encode updateSentStoryReaction#7d627683: field reaction: %w", )
}
return nil
}
func ( *UpdateSentStoryReaction) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateSentStoryReaction#7d627683 to nil")
}
if := .ConsumeID(UpdateSentStoryReactionTypeID); != nil {
return fmt.Errorf("unable to decode updateSentStoryReaction#7d627683: %w", )
}
return .DecodeBare()
}
func ( *UpdateSentStoryReaction) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateSentStoryReaction#7d627683 to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateSentStoryReaction#7d627683: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateSentStoryReaction#7d627683: field story_id: %w", )
}
.StoryID =
}
{
, := DecodeReaction()
if != nil {
return fmt.Errorf("unable to decode updateSentStoryReaction#7d627683: field reaction: %w", )
}
.Reaction =
}
return nil
}
func ( *UpdateSentStoryReaction) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateSentStoryReaction) () ( int) {
if == nil {
return
}
return .StoryID
}
func ( *UpdateSentStoryReaction) () ( ReactionClass) {
if == nil {
return
}
return .Reaction
}
type UpdateBotChatBoost struct {
Peer PeerClass
Boost Boost
Qts int
}
const UpdateBotChatBoostTypeID = 0x904dd49c
func ( UpdateBotChatBoost) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotChatBoost{}
_ bin.Decoder = &UpdateBotChatBoost{}
_ bin.BareEncoder = &UpdateBotChatBoost{}
_ bin.BareDecoder = &UpdateBotChatBoost{}
_ UpdateClass = &UpdateBotChatBoost{}
)
func ( *UpdateBotChatBoost) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.Boost.Zero()) {
return false
}
if !(.Qts == 0) {
return false
}
return true
}
func ( *UpdateBotChatBoost) () string {
if == nil {
return "UpdateBotChatBoost(nil)"
}
type UpdateBotChatBoost
return fmt.Sprintf("UpdateBotChatBoost%+v", (*))
}
func ( *UpdateBotChatBoost) ( interface {
() ( PeerClass)
() ( Boost)
() ( int)
}) {
.Peer = .()
.Boost = .()
.Qts = .()
}
func (*UpdateBotChatBoost) () uint32 {
return UpdateBotChatBoostTypeID
}
func (*UpdateBotChatBoost) () string {
return "updateBotChatBoost"
}
func ( *UpdateBotChatBoost) () tdp.Type {
:= tdp.Type{
Name: "updateBotChatBoost",
ID: UpdateBotChatBoostTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "Boost",
SchemaName: "boost",
},
{
Name: "Qts",
SchemaName: "qts",
},
}
return
}
func ( *UpdateBotChatBoost) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotChatBoost#904dd49c as nil")
}
.PutID(UpdateBotChatBoostTypeID)
return .EncodeBare()
}
func ( *UpdateBotChatBoost) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotChatBoost#904dd49c as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateBotChatBoost#904dd49c: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotChatBoost#904dd49c: field peer: %w", )
}
if := .Boost.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotChatBoost#904dd49c: field boost: %w", )
}
.PutInt(.Qts)
return nil
}
func ( *UpdateBotChatBoost) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotChatBoost#904dd49c to nil")
}
if := .ConsumeID(UpdateBotChatBoostTypeID); != nil {
return fmt.Errorf("unable to decode updateBotChatBoost#904dd49c: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotChatBoost) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotChatBoost#904dd49c to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateBotChatBoost#904dd49c: field peer: %w", )
}
.Peer =
}
{
if := .Boost.Decode(); != nil {
return fmt.Errorf("unable to decode updateBotChatBoost#904dd49c: field boost: %w", )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotChatBoost#904dd49c: field qts: %w", )
}
.Qts =
}
return nil
}
func ( *UpdateBotChatBoost) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateBotChatBoost) () ( Boost) {
if == nil {
return
}
return .Boost
}
func ( *UpdateBotChatBoost) () ( int) {
if == nil {
return
}
return .Qts
}
type UpdateChannelViewForumAsMessages struct {
ChannelID int64
Enabled bool
}
const UpdateChannelViewForumAsMessagesTypeID = 0x7b68920
func ( UpdateChannelViewForumAsMessages) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateChannelViewForumAsMessages{}
_ bin.Decoder = &UpdateChannelViewForumAsMessages{}
_ bin.BareEncoder = &UpdateChannelViewForumAsMessages{}
_ bin.BareDecoder = &UpdateChannelViewForumAsMessages{}
_ UpdateClass = &UpdateChannelViewForumAsMessages{}
)
func ( *UpdateChannelViewForumAsMessages) () bool {
if == nil {
return true
}
if !(.ChannelID == 0) {
return false
}
if !(.Enabled == false) {
return false
}
return true
}
func ( *UpdateChannelViewForumAsMessages) () string {
if == nil {
return "UpdateChannelViewForumAsMessages(nil)"
}
type UpdateChannelViewForumAsMessages
return fmt.Sprintf("UpdateChannelViewForumAsMessages%+v", (*))
}
func ( *UpdateChannelViewForumAsMessages) ( interface {
() ( int64)
() ( bool)
}) {
.ChannelID = .()
.Enabled = .()
}
func (*UpdateChannelViewForumAsMessages) () uint32 {
return UpdateChannelViewForumAsMessagesTypeID
}
func (*UpdateChannelViewForumAsMessages) () string {
return "updateChannelViewForumAsMessages"
}
func ( *UpdateChannelViewForumAsMessages) () tdp.Type {
:= tdp.Type{
Name: "updateChannelViewForumAsMessages",
ID: UpdateChannelViewForumAsMessagesTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "ChannelID",
SchemaName: "channel_id",
},
{
Name: "Enabled",
SchemaName: "enabled",
},
}
return
}
func ( *UpdateChannelViewForumAsMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelViewForumAsMessages#7b68920 as nil")
}
.PutID(UpdateChannelViewForumAsMessagesTypeID)
return .EncodeBare()
}
func ( *UpdateChannelViewForumAsMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateChannelViewForumAsMessages#7b68920 as nil")
}
.PutLong(.ChannelID)
.PutBool(.Enabled)
return nil
}
func ( *UpdateChannelViewForumAsMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelViewForumAsMessages#7b68920 to nil")
}
if := .ConsumeID(UpdateChannelViewForumAsMessagesTypeID); != nil {
return fmt.Errorf("unable to decode updateChannelViewForumAsMessages#7b68920: %w", )
}
return .DecodeBare()
}
func ( *UpdateChannelViewForumAsMessages) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateChannelViewForumAsMessages#7b68920 to nil")
}
{
, := .Long()
if != nil {
return fmt.Errorf("unable to decode updateChannelViewForumAsMessages#7b68920: field channel_id: %w", )
}
.ChannelID =
}
{
, := .Bool()
if != nil {
return fmt.Errorf("unable to decode updateChannelViewForumAsMessages#7b68920: field enabled: %w", )
}
.Enabled =
}
return nil
}
func ( *UpdateChannelViewForumAsMessages) () ( int64) {
if == nil {
return
}
return .ChannelID
}
func ( *UpdateChannelViewForumAsMessages) () ( bool) {
if == nil {
return
}
return .Enabled
}
type UpdatePeerWallpaper struct {
Flags bin.Fields
WallpaperOverridden bool
Peer PeerClass
Wallpaper WallPaperClass
}
const UpdatePeerWallpaperTypeID = 0xae3f101d
func ( UpdatePeerWallpaper) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdatePeerWallpaper{}
_ bin.Decoder = &UpdatePeerWallpaper{}
_ bin.BareEncoder = &UpdatePeerWallpaper{}
_ bin.BareDecoder = &UpdatePeerWallpaper{}
_ UpdateClass = &UpdatePeerWallpaper{}
)
func ( *UpdatePeerWallpaper) () bool {
if == nil {
return true
}
if !(.Flags.Zero()) {
return false
}
if !(.WallpaperOverridden == false) {
return false
}
if !(.Peer == nil) {
return false
}
if !(.Wallpaper == nil) {
return false
}
return true
}
func ( *UpdatePeerWallpaper) () string {
if == nil {
return "UpdatePeerWallpaper(nil)"
}
type UpdatePeerWallpaper
return fmt.Sprintf("UpdatePeerWallpaper%+v", (*))
}
func ( *UpdatePeerWallpaper) ( interface {
() ( bool)
() ( PeerClass)
() ( WallPaperClass, bool)
}) {
.WallpaperOverridden = .()
.Peer = .()
if , := .(); {
.Wallpaper =
}
}
func (*UpdatePeerWallpaper) () uint32 {
return UpdatePeerWallpaperTypeID
}
func (*UpdatePeerWallpaper) () string {
return "updatePeerWallpaper"
}
func ( *UpdatePeerWallpaper) () tdp.Type {
:= tdp.Type{
Name: "updatePeerWallpaper",
ID: UpdatePeerWallpaperTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "WallpaperOverridden",
SchemaName: "wallpaper_overridden",
Null: !.Flags.Has(1),
},
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "Wallpaper",
SchemaName: "wallpaper",
Null: !.Flags.Has(0),
},
}
return
}
func ( *UpdatePeerWallpaper) () {
if !(.WallpaperOverridden == false) {
.Flags.Set(1)
}
if !(.Wallpaper == nil) {
.Flags.Set(0)
}
}
func ( *UpdatePeerWallpaper) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePeerWallpaper#ae3f101d as nil")
}
.PutID(UpdatePeerWallpaperTypeID)
return .EncodeBare()
}
func ( *UpdatePeerWallpaper) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updatePeerWallpaper#ae3f101d as nil")
}
.SetFlags()
if := .Flags.Encode(); != nil {
return fmt.Errorf("unable to encode updatePeerWallpaper#ae3f101d: field flags: %w", )
}
if .Peer == nil {
return fmt.Errorf("unable to encode updatePeerWallpaper#ae3f101d: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updatePeerWallpaper#ae3f101d: field peer: %w", )
}
if .Flags.Has(0) {
if .Wallpaper == nil {
return fmt.Errorf("unable to encode updatePeerWallpaper#ae3f101d: field wallpaper is nil")
}
if := .Wallpaper.Encode(); != nil {
return fmt.Errorf("unable to encode updatePeerWallpaper#ae3f101d: field wallpaper: %w", )
}
}
return nil
}
func ( *UpdatePeerWallpaper) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePeerWallpaper#ae3f101d to nil")
}
if := .ConsumeID(UpdatePeerWallpaperTypeID); != nil {
return fmt.Errorf("unable to decode updatePeerWallpaper#ae3f101d: %w", )
}
return .DecodeBare()
}
func ( *UpdatePeerWallpaper) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updatePeerWallpaper#ae3f101d to nil")
}
{
if := .Flags.Decode(); != nil {
return fmt.Errorf("unable to decode updatePeerWallpaper#ae3f101d: field flags: %w", )
}
}
.WallpaperOverridden = .Flags.Has(1)
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updatePeerWallpaper#ae3f101d: field peer: %w", )
}
.Peer =
}
if .Flags.Has(0) {
, := DecodeWallPaper()
if != nil {
return fmt.Errorf("unable to decode updatePeerWallpaper#ae3f101d: field wallpaper: %w", )
}
.Wallpaper =
}
return nil
}
func ( *UpdatePeerWallpaper) ( bool) {
if {
.Flags.Set(1)
.WallpaperOverridden = true
} else {
.Flags.Unset(1)
.WallpaperOverridden = false
}
}
func ( *UpdatePeerWallpaper) () ( bool) {
if == nil {
return
}
return .Flags.Has(1)
}
func ( *UpdatePeerWallpaper) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdatePeerWallpaper) ( WallPaperClass) {
.Flags.Set(0)
.Wallpaper =
}
func ( *UpdatePeerWallpaper) () ( WallPaperClass, bool) {
if == nil {
return
}
if !.Flags.Has(0) {
return , false
}
return .Wallpaper, true
}
type UpdateBotMessageReaction struct {
Peer PeerClass
MsgID int
Date int
Actor PeerClass
OldReactions []ReactionClass
NewReactions []ReactionClass
Qts int
}
const UpdateBotMessageReactionTypeID = 0xac21d3ce
func ( UpdateBotMessageReaction) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotMessageReaction{}
_ bin.Decoder = &UpdateBotMessageReaction{}
_ bin.BareEncoder = &UpdateBotMessageReaction{}
_ bin.BareDecoder = &UpdateBotMessageReaction{}
_ UpdateClass = &UpdateBotMessageReaction{}
)
func ( *UpdateBotMessageReaction) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.MsgID == 0) {
return false
}
if !(.Date == 0) {
return false
}
if !(.Actor == nil) {
return false
}
if !(.OldReactions == nil) {
return false
}
if !(.NewReactions == nil) {
return false
}
if !(.Qts == 0) {
return false
}
return true
}
func ( *UpdateBotMessageReaction) () string {
if == nil {
return "UpdateBotMessageReaction(nil)"
}
type UpdateBotMessageReaction
return fmt.Sprintf("UpdateBotMessageReaction%+v", (*))
}
func ( *UpdateBotMessageReaction) ( interface {
() ( PeerClass)
() ( int)
() ( int)
() ( PeerClass)
() ( []ReactionClass)
() ( []ReactionClass)
() ( int)
}) {
.Peer = .()
.MsgID = .()
.Date = .()
.Actor = .()
.OldReactions = .()
.NewReactions = .()
.Qts = .()
}
func (*UpdateBotMessageReaction) () uint32 {
return UpdateBotMessageReactionTypeID
}
func (*UpdateBotMessageReaction) () string {
return "updateBotMessageReaction"
}
func ( *UpdateBotMessageReaction) () tdp.Type {
:= tdp.Type{
Name: "updateBotMessageReaction",
ID: UpdateBotMessageReactionTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "MsgID",
SchemaName: "msg_id",
},
{
Name: "Date",
SchemaName: "date",
},
{
Name: "Actor",
SchemaName: "actor",
},
{
Name: "OldReactions",
SchemaName: "old_reactions",
},
{
Name: "NewReactions",
SchemaName: "new_reactions",
},
{
Name: "Qts",
SchemaName: "qts",
},
}
return
}
func ( *UpdateBotMessageReaction) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotMessageReaction#ac21d3ce as nil")
}
.PutID(UpdateBotMessageReactionTypeID)
return .EncodeBare()
}
func ( *UpdateBotMessageReaction) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotMessageReaction#ac21d3ce as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateBotMessageReaction#ac21d3ce: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotMessageReaction#ac21d3ce: field peer: %w", )
}
.PutInt(.MsgID)
.PutInt(.Date)
if .Actor == nil {
return fmt.Errorf("unable to encode updateBotMessageReaction#ac21d3ce: field actor is nil")
}
if := .Actor.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotMessageReaction#ac21d3ce: field actor: %w", )
}
.PutVectorHeader(len(.OldReactions))
for , := range .OldReactions {
if == nil {
return fmt.Errorf("unable to encode updateBotMessageReaction#ac21d3ce: field old_reactions element with index %d is nil", )
}
if := .Encode(); != nil {
return fmt.Errorf("unable to encode updateBotMessageReaction#ac21d3ce: field old_reactions element with index %d: %w", , )
}
}
.PutVectorHeader(len(.NewReactions))
for , := range .NewReactions {
if == nil {
return fmt.Errorf("unable to encode updateBotMessageReaction#ac21d3ce: field new_reactions element with index %d is nil", )
}
if := .Encode(); != nil {
return fmt.Errorf("unable to encode updateBotMessageReaction#ac21d3ce: field new_reactions element with index %d: %w", , )
}
}
.PutInt(.Qts)
return nil
}
func ( *UpdateBotMessageReaction) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotMessageReaction#ac21d3ce to nil")
}
if := .ConsumeID(UpdateBotMessageReactionTypeID); != nil {
return fmt.Errorf("unable to decode updateBotMessageReaction#ac21d3ce: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotMessageReaction) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotMessageReaction#ac21d3ce to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReaction#ac21d3ce: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReaction#ac21d3ce: field msg_id: %w", )
}
.MsgID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReaction#ac21d3ce: field date: %w", )
}
.Date =
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReaction#ac21d3ce: field actor: %w", )
}
.Actor =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReaction#ac21d3ce: field old_reactions: %w", )
}
if > 0 {
.OldReactions = make([]ReactionClass, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := DecodeReaction()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReaction#ac21d3ce: field old_reactions: %w", )
}
.OldReactions = append(.OldReactions, )
}
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReaction#ac21d3ce: field new_reactions: %w", )
}
if > 0 {
.NewReactions = make([]ReactionClass, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
, := DecodeReaction()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReaction#ac21d3ce: field new_reactions: %w", )
}
.NewReactions = append(.NewReactions, )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReaction#ac21d3ce: field qts: %w", )
}
.Qts =
}
return nil
}
func ( *UpdateBotMessageReaction) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateBotMessageReaction) () ( int) {
if == nil {
return
}
return .MsgID
}
func ( *UpdateBotMessageReaction) () ( int) {
if == nil {
return
}
return .Date
}
func ( *UpdateBotMessageReaction) () ( PeerClass) {
if == nil {
return
}
return .Actor
}
func ( *UpdateBotMessageReaction) () ( []ReactionClass) {
if == nil {
return
}
return .OldReactions
}
func ( *UpdateBotMessageReaction) () ( []ReactionClass) {
if == nil {
return
}
return .NewReactions
}
func ( *UpdateBotMessageReaction) () ( int) {
if == nil {
return
}
return .Qts
}
func ( *UpdateBotMessageReaction) () ( ReactionClassArray) {
return ReactionClassArray(.OldReactions)
}
func ( *UpdateBotMessageReaction) () ( ReactionClassArray) {
return ReactionClassArray(.NewReactions)
}
type UpdateBotMessageReactions struct {
Peer PeerClass
MsgID int
Date int
Reactions []ReactionCount
Qts int
}
const UpdateBotMessageReactionsTypeID = 0x9cb7759
func ( UpdateBotMessageReactions) () UpdateClass { return & }
var (
_ bin.Encoder = &UpdateBotMessageReactions{}
_ bin.Decoder = &UpdateBotMessageReactions{}
_ bin.BareEncoder = &UpdateBotMessageReactions{}
_ bin.BareDecoder = &UpdateBotMessageReactions{}
_ UpdateClass = &UpdateBotMessageReactions{}
)
func ( *UpdateBotMessageReactions) () bool {
if == nil {
return true
}
if !(.Peer == nil) {
return false
}
if !(.MsgID == 0) {
return false
}
if !(.Date == 0) {
return false
}
if !(.Reactions == nil) {
return false
}
if !(.Qts == 0) {
return false
}
return true
}
func ( *UpdateBotMessageReactions) () string {
if == nil {
return "UpdateBotMessageReactions(nil)"
}
type UpdateBotMessageReactions
return fmt.Sprintf("UpdateBotMessageReactions%+v", (*))
}
func ( *UpdateBotMessageReactions) ( interface {
() ( PeerClass)
() ( int)
() ( int)
() ( []ReactionCount)
() ( int)
}) {
.Peer = .()
.MsgID = .()
.Date = .()
.Reactions = .()
.Qts = .()
}
func (*UpdateBotMessageReactions) () uint32 {
return UpdateBotMessageReactionsTypeID
}
func (*UpdateBotMessageReactions) () string {
return "updateBotMessageReactions"
}
func ( *UpdateBotMessageReactions) () tdp.Type {
:= tdp.Type{
Name: "updateBotMessageReactions",
ID: UpdateBotMessageReactionsTypeID,
}
if == nil {
.Null = true
return
}
.Fields = []tdp.Field{
{
Name: "Peer",
SchemaName: "peer",
},
{
Name: "MsgID",
SchemaName: "msg_id",
},
{
Name: "Date",
SchemaName: "date",
},
{
Name: "Reactions",
SchemaName: "reactions",
},
{
Name: "Qts",
SchemaName: "qts",
},
}
return
}
func ( *UpdateBotMessageReactions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotMessageReactions#9cb7759 as nil")
}
.PutID(UpdateBotMessageReactionsTypeID)
return .EncodeBare()
}
func ( *UpdateBotMessageReactions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't encode updateBotMessageReactions#9cb7759 as nil")
}
if .Peer == nil {
return fmt.Errorf("unable to encode updateBotMessageReactions#9cb7759: field peer is nil")
}
if := .Peer.Encode(); != nil {
return fmt.Errorf("unable to encode updateBotMessageReactions#9cb7759: field peer: %w", )
}
.PutInt(.MsgID)
.PutInt(.Date)
.PutVectorHeader(len(.Reactions))
for , := range .Reactions {
if := .Encode(); != nil {
return fmt.Errorf("unable to encode updateBotMessageReactions#9cb7759: field reactions element with index %d: %w", , )
}
}
.PutInt(.Qts)
return nil
}
func ( *UpdateBotMessageReactions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotMessageReactions#9cb7759 to nil")
}
if := .ConsumeID(UpdateBotMessageReactionsTypeID); != nil {
return fmt.Errorf("unable to decode updateBotMessageReactions#9cb7759: %w", )
}
return .DecodeBare()
}
func ( *UpdateBotMessageReactions) ( *bin.Buffer) error {
if == nil {
return fmt.Errorf("can't decode updateBotMessageReactions#9cb7759 to nil")
}
{
, := DecodePeer()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReactions#9cb7759: field peer: %w", )
}
.Peer =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReactions#9cb7759: field msg_id: %w", )
}
.MsgID =
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReactions#9cb7759: field date: %w", )
}
.Date =
}
{
, := .VectorHeader()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReactions#9cb7759: field reactions: %w", )
}
if > 0 {
.Reactions = make([]ReactionCount, 0, %bin.PreallocateLimit)
}
for := 0; < ; ++ {
var ReactionCount
if := .Decode(); != nil {
return fmt.Errorf("unable to decode updateBotMessageReactions#9cb7759: field reactions: %w", )
}
.Reactions = append(.Reactions, )
}
}
{
, := .Int()
if != nil {
return fmt.Errorf("unable to decode updateBotMessageReactions#9cb7759: field qts: %w", )
}
.Qts =
}
return nil
}
func ( *UpdateBotMessageReactions) () ( PeerClass) {
if == nil {
return
}
return .Peer
}
func ( *UpdateBotMessageReactions) () ( int) {
if == nil {
return
}
return .MsgID
}
func ( *UpdateBotMessageReactions) () ( int) {
if == nil {
return
}
return .Date
}
func ( *UpdateBotMessageReactions) () ( []ReactionCount) {
if == nil {
return
}
return .Reactions
}
func ( *UpdateBotMessageReactions) () ( int) {
if == nil {
return
}
return .Qts
}
const UpdateClassName = "Update"
type UpdateClass interface {
bin.Encoder
bin.Decoder
bin.BareEncoder
bin.BareDecoder
construct() UpdateClass
TypeID() uint32
TypeName() string
String() string
Zero() bool
}
func ( *bin.Buffer) (UpdateClass, error) {
, := .PeekID()
if != nil {
return nil,
}
switch {
case UpdateNewMessageTypeID:
:= UpdateNewMessage{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateMessageIDTypeID:
:= UpdateMessageID{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateDeleteMessagesTypeID:
:= UpdateDeleteMessages{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateUserTypingTypeID:
:= UpdateUserTyping{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChatUserTypingTypeID:
:= UpdateChatUserTyping{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChatParticipantsTypeID:
:= UpdateChatParticipants{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateUserStatusTypeID:
:= UpdateUserStatus{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateUserNameTypeID:
:= UpdateUserName{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateNewAuthorizationTypeID:
:= UpdateNewAuthorization{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateNewEncryptedMessageTypeID:
:= UpdateNewEncryptedMessage{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateEncryptedChatTypingTypeID:
:= UpdateEncryptedChatTyping{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateEncryptionTypeID:
:= UpdateEncryption{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateEncryptedMessagesReadTypeID:
:= UpdateEncryptedMessagesRead{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChatParticipantAddTypeID:
:= UpdateChatParticipantAdd{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChatParticipantDeleteTypeID:
:= UpdateChatParticipantDelete{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateDCOptionsTypeID:
:= UpdateDCOptions{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateNotifySettingsTypeID:
:= UpdateNotifySettings{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateServiceNotificationTypeID:
:= UpdateServiceNotification{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdatePrivacyTypeID:
:= UpdatePrivacy{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateUserPhoneTypeID:
:= UpdateUserPhone{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateReadHistoryInboxTypeID:
:= UpdateReadHistoryInbox{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateReadHistoryOutboxTypeID:
:= UpdateReadHistoryOutbox{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateWebPageTypeID:
:= UpdateWebPage{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateReadMessagesContentsTypeID:
:= UpdateReadMessagesContents{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChannelTooLongTypeID:
:= UpdateChannelTooLong{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChannelTypeID:
:= UpdateChannel{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateNewChannelMessageTypeID:
:= UpdateNewChannelMessage{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateReadChannelInboxTypeID:
:= UpdateReadChannelInbox{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateDeleteChannelMessagesTypeID:
:= UpdateDeleteChannelMessages{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChannelMessageViewsTypeID:
:= UpdateChannelMessageViews{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChatParticipantAdminTypeID:
:= UpdateChatParticipantAdmin{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateNewStickerSetTypeID:
:= UpdateNewStickerSet{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateStickerSetsOrderTypeID:
:= UpdateStickerSetsOrder{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateStickerSetsTypeID:
:= UpdateStickerSets{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateSavedGifsTypeID:
:= UpdateSavedGifs{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateBotInlineQueryTypeID:
:= UpdateBotInlineQuery{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateBotInlineSendTypeID:
:= UpdateBotInlineSend{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateEditChannelMessageTypeID:
:= UpdateEditChannelMessage{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateBotCallbackQueryTypeID:
:= UpdateBotCallbackQuery{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateEditMessageTypeID:
:= UpdateEditMessage{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateInlineBotCallbackQueryTypeID:
:= UpdateInlineBotCallbackQuery{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateReadChannelOutboxTypeID:
:= UpdateReadChannelOutbox{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateDraftMessageTypeID:
:= UpdateDraftMessage{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateReadFeaturedStickersTypeID:
:= UpdateReadFeaturedStickers{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateRecentStickersTypeID:
:= UpdateRecentStickers{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateConfigTypeID:
:= UpdateConfig{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdatePtsChangedTypeID:
:= UpdatePtsChanged{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChannelWebPageTypeID:
:= UpdateChannelWebPage{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateDialogPinnedTypeID:
:= UpdateDialogPinned{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdatePinnedDialogsTypeID:
:= UpdatePinnedDialogs{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateBotWebhookJSONTypeID:
:= UpdateBotWebhookJSON{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateBotWebhookJSONQueryTypeID:
:= UpdateBotWebhookJSONQuery{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateBotShippingQueryTypeID:
:= UpdateBotShippingQuery{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateBotPrecheckoutQueryTypeID:
:= UpdateBotPrecheckoutQuery{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdatePhoneCallTypeID:
:= UpdatePhoneCall{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateLangPackTooLongTypeID:
:= UpdateLangPackTooLong{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateLangPackTypeID:
:= UpdateLangPack{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateFavedStickersTypeID:
:= UpdateFavedStickers{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChannelReadMessagesContentsTypeID:
:= UpdateChannelReadMessagesContents{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateContactsResetTypeID:
:= UpdateContactsReset{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChannelAvailableMessagesTypeID:
:= UpdateChannelAvailableMessages{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateDialogUnreadMarkTypeID:
:= UpdateDialogUnreadMark{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateMessagePollTypeID:
:= UpdateMessagePoll{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChatDefaultBannedRightsTypeID:
:= UpdateChatDefaultBannedRights{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateFolderPeersTypeID:
:= UpdateFolderPeers{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdatePeerSettingsTypeID:
:= UpdatePeerSettings{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdatePeerLocatedTypeID:
:= UpdatePeerLocated{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateNewScheduledMessageTypeID:
:= UpdateNewScheduledMessage{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateDeleteScheduledMessagesTypeID:
:= UpdateDeleteScheduledMessages{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateThemeTypeID:
:= UpdateTheme{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateGeoLiveViewedTypeID:
:= UpdateGeoLiveViewed{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateLoginTokenTypeID:
:= UpdateLoginToken{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateMessagePollVoteTypeID:
:= UpdateMessagePollVote{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateDialogFilterTypeID:
:= UpdateDialogFilter{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateDialogFilterOrderTypeID:
:= UpdateDialogFilterOrder{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateDialogFiltersTypeID:
:= UpdateDialogFilters{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdatePhoneCallSignalingDataTypeID:
:= UpdatePhoneCallSignalingData{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChannelMessageForwardsTypeID:
:= UpdateChannelMessageForwards{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateReadChannelDiscussionInboxTypeID:
:= UpdateReadChannelDiscussionInbox{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateReadChannelDiscussionOutboxTypeID:
:= UpdateReadChannelDiscussionOutbox{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdatePeerBlockedTypeID:
:= UpdatePeerBlocked{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChannelUserTypingTypeID:
:= UpdateChannelUserTyping{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdatePinnedMessagesTypeID:
:= UpdatePinnedMessages{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdatePinnedChannelMessagesTypeID:
:= UpdatePinnedChannelMessages{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChatTypeID:
:= UpdateChat{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateGroupCallParticipantsTypeID:
:= UpdateGroupCallParticipants{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateGroupCallTypeID:
:= UpdateGroupCall{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdatePeerHistoryTTLTypeID:
:= UpdatePeerHistoryTTL{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChatParticipantTypeID:
:= UpdateChatParticipant{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateChannelParticipantTypeID:
:= UpdateChannelParticipant{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateBotStoppedTypeID:
:= UpdateBotStopped{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateGroupCallConnectionTypeID:
:= UpdateGroupCallConnection{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdateBotCommandsTypeID:
:= UpdateBotCommands{}
if := .Decode(); != nil {
return nil, fmt.Errorf("unable to decode UpdateClass: %w", )
}
return &, nil
case UpdatePendingJoinRequestsTypeID:
:= UpdatePendingJoinRequests{}
if := .Decode(); != nil {
return