// Code generated by protoc-gen-go. DO NOT EDIT.
// source: tl_update.proto

package proxy

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import mtproto "github.com/cjongseok/mtproto"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

type Update struct {
	// Types that are valid to be assigned to Value:
	//	*Update_UpdatesState
	//	*Update_UpdateShortMessage
	//	*Update_UpdateShortChatMessage
	//	*Update_UpdateShort
	//	*Update_Updates
	//	*Update_UpdateShortSentMessage
	//	*Update_UpdatesDifference
	//	*Update_UpdatesDifferenceSlice
	//	*Update_UpdateNewMessage
	//	*Update_UpdateReadMessagesContents
	//	*Update_UpdateDeleteMessages
	//	*Update_UpdateNewEncryptedMessage
	//	*Update_UpdateChannel
	//	*Update_UpdateChannelMessageViews
	//	*Update_UpdateChannelTooLong
	//	*Update_UpdateReadChannelInbox
	//	*Update_UpdateReadChannelOutbox
	//	*Update_UpdateNewChannelMessage
	Value                isUpdate_Value `protobuf_oneof:"Value"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (m *Update) Reset()         { *m = Update{} }
func (m *Update) String() string { return proto.CompactTextString(m) }
func (*Update) ProtoMessage()    {}
func (*Update) Descriptor() ([]byte, []int) {
	return fileDescriptor_tl_update_1c97a93e1b72e269, []int{0}
}
func (m *Update) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Update.Unmarshal(m, b)
}
func (m *Update) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Update.Marshal(b, m, deterministic)
}
func (dst *Update) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Update.Merge(dst, src)
}
func (m *Update) XXX_Size() int {
	return xxx_messageInfo_Update.Size(m)
}
func (m *Update) XXX_DiscardUnknown() {
	xxx_messageInfo_Update.DiscardUnknown(m)
}

var xxx_messageInfo_Update proto.InternalMessageInfo

type isUpdate_Value interface {
	isUpdate_Value()
}

type Update_UpdatesState struct {
	UpdatesState *mtproto.PredUpdatesState `protobuf:"bytes,1,opt,name=UpdatesState,oneof"`
}
type Update_UpdateShortMessage struct {
	UpdateShortMessage *mtproto.PredUpdateShortMessage `protobuf:"bytes,2,opt,name=UpdateShortMessage,oneof"`
}
type Update_UpdateShortChatMessage struct {
	UpdateShortChatMessage *mtproto.PredUpdateShortChatMessage `protobuf:"bytes,3,opt,name=UpdateShortChatMessage,oneof"`
}
type Update_UpdateShort struct {
	UpdateShort *mtproto.PredUpdateShort `protobuf:"bytes,4,opt,name=UpdateShort,oneof"`
}
type Update_Updates struct {
	Updates *mtproto.PredUpdates `protobuf:"bytes,5,opt,name=Updates,oneof"`
}
type Update_UpdateShortSentMessage struct {
	UpdateShortSentMessage *mtproto.PredUpdateShortSentMessage `protobuf:"bytes,6,opt,name=UpdateShortSentMessage,oneof"`
}
type Update_UpdatesDifference struct {
	UpdatesDifference *mtproto.PredUpdatesDifference `protobuf:"bytes,7,opt,name=UpdatesDifference,oneof"`
}
type Update_UpdatesDifferenceSlice struct {
	UpdatesDifferenceSlice *mtproto.PredUpdatesDifferenceSlice `protobuf:"bytes,8,opt,name=UpdatesDifferenceSlice,oneof"`
}
type Update_UpdateNewMessage struct {
	UpdateNewMessage *mtproto.PredUpdateNewMessage `protobuf:"bytes,9,opt,name=UpdateNewMessage,oneof"`
}
type Update_UpdateReadMessagesContents struct {
	UpdateReadMessagesContents *mtproto.PredUpdateReadMessagesContents `protobuf:"bytes,10,opt,name=UpdateReadMessagesContents,oneof"`
}
type Update_UpdateDeleteMessages struct {
	UpdateDeleteMessages *mtproto.PredUpdateDeleteMessages `protobuf:"bytes,11,opt,name=UpdateDeleteMessages,oneof"`
}
type Update_UpdateNewEncryptedMessage struct {
	UpdateNewEncryptedMessage *mtproto.PredUpdateNewEncryptedMessage `protobuf:"bytes,12,opt,name=UpdateNewEncryptedMessage,oneof"`
}
type Update_UpdateChannel struct {
	UpdateChannel *mtproto.PredUpdateChannel `protobuf:"bytes,13,opt,name=UpdateChannel,oneof"`
}
type Update_UpdateChannelMessageViews struct {
	UpdateChannelMessageViews *mtproto.PredUpdateChannelMessageViews `protobuf:"bytes,14,opt,name=UpdateChannelMessageViews,oneof"`
}
type Update_UpdateChannelTooLong struct {
	UpdateChannelTooLong *mtproto.PredUpdateChannelTooLong `protobuf:"bytes,15,opt,name=UpdateChannelTooLong,oneof"`
}
type Update_UpdateReadChannelInbox struct {
	UpdateReadChannelInbox *mtproto.PredUpdateReadChannelInbox `protobuf:"bytes,16,opt,name=UpdateReadChannelInbox,oneof"`
}
type Update_UpdateReadChannelOutbox struct {
	UpdateReadChannelOutbox *mtproto.PredUpdateReadChannelOutbox `protobuf:"bytes,17,opt,name=UpdateReadChannelOutbox,oneof"`
}
type Update_UpdateNewChannelMessage struct {
	UpdateNewChannelMessage *mtproto.PredUpdateNewChannelMessage `protobuf:"bytes,18,opt,name=UpdateNewChannelMessage,oneof"`
}

func (*Update_UpdatesState) isUpdate_Value()               {}
func (*Update_UpdateShortMessage) isUpdate_Value()         {}
func (*Update_UpdateShortChatMessage) isUpdate_Value()     {}
func (*Update_UpdateShort) isUpdate_Value()                {}
func (*Update_Updates) isUpdate_Value()                    {}
func (*Update_UpdateShortSentMessage) isUpdate_Value()     {}
func (*Update_UpdatesDifference) isUpdate_Value()          {}
func (*Update_UpdatesDifferenceSlice) isUpdate_Value()     {}
func (*Update_UpdateNewMessage) isUpdate_Value()           {}
func (*Update_UpdateReadMessagesContents) isUpdate_Value() {}
func (*Update_UpdateDeleteMessages) isUpdate_Value()       {}
func (*Update_UpdateNewEncryptedMessage) isUpdate_Value()  {}
func (*Update_UpdateChannel) isUpdate_Value()              {}
func (*Update_UpdateChannelMessageViews) isUpdate_Value()  {}
func (*Update_UpdateChannelTooLong) isUpdate_Value()       {}
func (*Update_UpdateReadChannelInbox) isUpdate_Value()     {}
func (*Update_UpdateReadChannelOutbox) isUpdate_Value()    {}
func (*Update_UpdateNewChannelMessage) isUpdate_Value()    {}

func (m *Update) GetValue() isUpdate_Value {
	if m != nil {
		return m.Value
	}
	return nil
}

func (m *Update) GetUpdatesState() *mtproto.PredUpdatesState {
	if x, ok := m.GetValue().(*Update_UpdatesState); ok {
		return x.UpdatesState
	}
	return nil
}

func (m *Update) GetUpdateShortMessage() *mtproto.PredUpdateShortMessage {
	if x, ok := m.GetValue().(*Update_UpdateShortMessage); ok {
		return x.UpdateShortMessage
	}
	return nil
}

func (m *Update) GetUpdateShortChatMessage() *mtproto.PredUpdateShortChatMessage {
	if x, ok := m.GetValue().(*Update_UpdateShortChatMessage); ok {
		return x.UpdateShortChatMessage
	}
	return nil
}

func (m *Update) GetUpdateShort() *mtproto.PredUpdateShort {
	if x, ok := m.GetValue().(*Update_UpdateShort); ok {
		return x.UpdateShort
	}
	return nil
}

func (m *Update) GetUpdates() *mtproto.PredUpdates {
	if x, ok := m.GetValue().(*Update_Updates); ok {
		return x.Updates
	}
	return nil
}

func (m *Update) GetUpdateShortSentMessage() *mtproto.PredUpdateShortSentMessage {
	if x, ok := m.GetValue().(*Update_UpdateShortSentMessage); ok {
		return x.UpdateShortSentMessage
	}
	return nil
}

func (m *Update) GetUpdatesDifference() *mtproto.PredUpdatesDifference {
	if x, ok := m.GetValue().(*Update_UpdatesDifference); ok {
		return x.UpdatesDifference
	}
	return nil
}

func (m *Update) GetUpdatesDifferenceSlice() *mtproto.PredUpdatesDifferenceSlice {
	if x, ok := m.GetValue().(*Update_UpdatesDifferenceSlice); ok {
		return x.UpdatesDifferenceSlice
	}
	return nil
}

func (m *Update) GetUpdateNewMessage() *mtproto.PredUpdateNewMessage {
	if x, ok := m.GetValue().(*Update_UpdateNewMessage); ok {
		return x.UpdateNewMessage
	}
	return nil
}

func (m *Update) GetUpdateReadMessagesContents() *mtproto.PredUpdateReadMessagesContents {
	if x, ok := m.GetValue().(*Update_UpdateReadMessagesContents); ok {
		return x.UpdateReadMessagesContents
	}
	return nil
}

func (m *Update) GetUpdateDeleteMessages() *mtproto.PredUpdateDeleteMessages {
	if x, ok := m.GetValue().(*Update_UpdateDeleteMessages); ok {
		return x.UpdateDeleteMessages
	}
	return nil
}

func (m *Update) GetUpdateNewEncryptedMessage() *mtproto.PredUpdateNewEncryptedMessage {
	if x, ok := m.GetValue().(*Update_UpdateNewEncryptedMessage); ok {
		return x.UpdateNewEncryptedMessage
	}
	return nil
}

func (m *Update) GetUpdateChannel() *mtproto.PredUpdateChannel {
	if x, ok := m.GetValue().(*Update_UpdateChannel); ok {
		return x.UpdateChannel
	}
	return nil
}

func (m *Update) GetUpdateChannelMessageViews() *mtproto.PredUpdateChannelMessageViews {
	if x, ok := m.GetValue().(*Update_UpdateChannelMessageViews); ok {
		return x.UpdateChannelMessageViews
	}
	return nil
}

func (m *Update) GetUpdateChannelTooLong() *mtproto.PredUpdateChannelTooLong {
	if x, ok := m.GetValue().(*Update_UpdateChannelTooLong); ok {
		return x.UpdateChannelTooLong
	}
	return nil
}

func (m *Update) GetUpdateReadChannelInbox() *mtproto.PredUpdateReadChannelInbox {
	if x, ok := m.GetValue().(*Update_UpdateReadChannelInbox); ok {
		return x.UpdateReadChannelInbox
	}
	return nil
}

func (m *Update) GetUpdateReadChannelOutbox() *mtproto.PredUpdateReadChannelOutbox {
	if x, ok := m.GetValue().(*Update_UpdateReadChannelOutbox); ok {
		return x.UpdateReadChannelOutbox
	}
	return nil
}

func (m *Update) GetUpdateNewChannelMessage() *mtproto.PredUpdateNewChannelMessage {
	if x, ok := m.GetValue().(*Update_UpdateNewChannelMessage); ok {
		return x.UpdateNewChannelMessage
	}
	return nil
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*Update) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _Update_OneofMarshaler, _Update_OneofUnmarshaler, _Update_OneofSizer, []interface{}{
		(*Update_UpdatesState)(nil),
		(*Update_UpdateShortMessage)(nil),
		(*Update_UpdateShortChatMessage)(nil),
		(*Update_UpdateShort)(nil),
		(*Update_Updates)(nil),
		(*Update_UpdateShortSentMessage)(nil),
		(*Update_UpdatesDifference)(nil),
		(*Update_UpdatesDifferenceSlice)(nil),
		(*Update_UpdateNewMessage)(nil),
		(*Update_UpdateReadMessagesContents)(nil),
		(*Update_UpdateDeleteMessages)(nil),
		(*Update_UpdateNewEncryptedMessage)(nil),
		(*Update_UpdateChannel)(nil),
		(*Update_UpdateChannelMessageViews)(nil),
		(*Update_UpdateChannelTooLong)(nil),
		(*Update_UpdateReadChannelInbox)(nil),
		(*Update_UpdateReadChannelOutbox)(nil),
		(*Update_UpdateNewChannelMessage)(nil),
	}
}

func _Update_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*Update)
	// Value
	switch x := m.Value.(type) {
	case *Update_UpdatesState:
		b.EncodeVarint(1<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdatesState); err != nil {
			return err
		}
	case *Update_UpdateShortMessage:
		b.EncodeVarint(2<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateShortMessage); err != nil {
			return err
		}
	case *Update_UpdateShortChatMessage:
		b.EncodeVarint(3<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateShortChatMessage); err != nil {
			return err
		}
	case *Update_UpdateShort:
		b.EncodeVarint(4<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateShort); err != nil {
			return err
		}
	case *Update_Updates:
		b.EncodeVarint(5<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.Updates); err != nil {
			return err
		}
	case *Update_UpdateShortSentMessage:
		b.EncodeVarint(6<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateShortSentMessage); err != nil {
			return err
		}
	case *Update_UpdatesDifference:
		b.EncodeVarint(7<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdatesDifference); err != nil {
			return err
		}
	case *Update_UpdatesDifferenceSlice:
		b.EncodeVarint(8<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdatesDifferenceSlice); err != nil {
			return err
		}
	case *Update_UpdateNewMessage:
		b.EncodeVarint(9<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateNewMessage); err != nil {
			return err
		}
	case *Update_UpdateReadMessagesContents:
		b.EncodeVarint(10<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateReadMessagesContents); err != nil {
			return err
		}
	case *Update_UpdateDeleteMessages:
		b.EncodeVarint(11<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateDeleteMessages); err != nil {
			return err
		}
	case *Update_UpdateNewEncryptedMessage:
		b.EncodeVarint(12<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateNewEncryptedMessage); err != nil {
			return err
		}
	case *Update_UpdateChannel:
		b.EncodeVarint(13<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateChannel); err != nil {
			return err
		}
	case *Update_UpdateChannelMessageViews:
		b.EncodeVarint(14<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateChannelMessageViews); err != nil {
			return err
		}
	case *Update_UpdateChannelTooLong:
		b.EncodeVarint(15<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateChannelTooLong); err != nil {
			return err
		}
	case *Update_UpdateReadChannelInbox:
		b.EncodeVarint(16<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateReadChannelInbox); err != nil {
			return err
		}
	case *Update_UpdateReadChannelOutbox:
		b.EncodeVarint(17<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateReadChannelOutbox); err != nil {
			return err
		}
	case *Update_UpdateNewChannelMessage:
		b.EncodeVarint(18<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.UpdateNewChannelMessage); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("Update.Value has unexpected type %T", x)
	}
	return nil
}

func _Update_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*Update)
	switch tag {
	case 1: // Value.UpdatesState
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdatesState)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdatesState{msg}
		return true, err
	case 2: // Value.UpdateShortMessage
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateShortMessage)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateShortMessage{msg}
		return true, err
	case 3: // Value.UpdateShortChatMessage
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateShortChatMessage)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateShortChatMessage{msg}
		return true, err
	case 4: // Value.UpdateShort
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateShort)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateShort{msg}
		return true, err
	case 5: // Value.Updates
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdates)
		err := b.DecodeMessage(msg)
		m.Value = &Update_Updates{msg}
		return true, err
	case 6: // Value.UpdateShortSentMessage
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateShortSentMessage)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateShortSentMessage{msg}
		return true, err
	case 7: // Value.UpdatesDifference
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdatesDifference)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdatesDifference{msg}
		return true, err
	case 8: // Value.UpdatesDifferenceSlice
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdatesDifferenceSlice)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdatesDifferenceSlice{msg}
		return true, err
	case 9: // Value.UpdateNewMessage
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateNewMessage)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateNewMessage{msg}
		return true, err
	case 10: // Value.UpdateReadMessagesContents
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateReadMessagesContents)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateReadMessagesContents{msg}
		return true, err
	case 11: // Value.UpdateDeleteMessages
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateDeleteMessages)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateDeleteMessages{msg}
		return true, err
	case 12: // Value.UpdateNewEncryptedMessage
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateNewEncryptedMessage)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateNewEncryptedMessage{msg}
		return true, err
	case 13: // Value.UpdateChannel
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateChannel)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateChannel{msg}
		return true, err
	case 14: // Value.UpdateChannelMessageViews
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateChannelMessageViews)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateChannelMessageViews{msg}
		return true, err
	case 15: // Value.UpdateChannelTooLong
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateChannelTooLong)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateChannelTooLong{msg}
		return true, err
	case 16: // Value.UpdateReadChannelInbox
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateReadChannelInbox)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateReadChannelInbox{msg}
		return true, err
	case 17: // Value.UpdateReadChannelOutbox
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateReadChannelOutbox)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateReadChannelOutbox{msg}
		return true, err
	case 18: // Value.UpdateNewChannelMessage
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(mtproto.PredUpdateNewChannelMessage)
		err := b.DecodeMessage(msg)
		m.Value = &Update_UpdateNewChannelMessage{msg}
		return true, err
	default:
		return false, nil
	}
}

func _Update_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*Update)
	// Value
	switch x := m.Value.(type) {
	case *Update_UpdatesState:
		s := proto.Size(x.UpdatesState)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateShortMessage:
		s := proto.Size(x.UpdateShortMessage)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateShortChatMessage:
		s := proto.Size(x.UpdateShortChatMessage)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateShort:
		s := proto.Size(x.UpdateShort)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_Updates:
		s := proto.Size(x.Updates)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateShortSentMessage:
		s := proto.Size(x.UpdateShortSentMessage)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdatesDifference:
		s := proto.Size(x.UpdatesDifference)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdatesDifferenceSlice:
		s := proto.Size(x.UpdatesDifferenceSlice)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateNewMessage:
		s := proto.Size(x.UpdateNewMessage)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateReadMessagesContents:
		s := proto.Size(x.UpdateReadMessagesContents)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateDeleteMessages:
		s := proto.Size(x.UpdateDeleteMessages)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateNewEncryptedMessage:
		s := proto.Size(x.UpdateNewEncryptedMessage)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateChannel:
		s := proto.Size(x.UpdateChannel)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateChannelMessageViews:
		s := proto.Size(x.UpdateChannelMessageViews)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateChannelTooLong:
		s := proto.Size(x.UpdateChannelTooLong)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateReadChannelInbox:
		s := proto.Size(x.UpdateReadChannelInbox)
		n += 2 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateReadChannelOutbox:
		s := proto.Size(x.UpdateReadChannelOutbox)
		n += 2 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Update_UpdateNewChannelMessage:
		s := proto.Size(x.UpdateNewChannelMessage)
		n += 2 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

type ListenRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *ListenRequest) Reset()         { *m = ListenRequest{} }
func (m *ListenRequest) String() string { return proto.CompactTextString(m) }
func (*ListenRequest) ProtoMessage()    {}
func (*ListenRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_tl_update_1c97a93e1b72e269, []int{1}
}
func (m *ListenRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ListenRequest.Unmarshal(m, b)
}
func (m *ListenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ListenRequest.Marshal(b, m, deterministic)
}
func (dst *ListenRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ListenRequest.Merge(dst, src)
}
func (m *ListenRequest) XXX_Size() int {
	return xxx_messageInfo_ListenRequest.Size(m)
}
func (m *ListenRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_ListenRequest.DiscardUnknown(m)
}

var xxx_messageInfo_ListenRequest proto.InternalMessageInfo

func init() {
	proto.RegisterType((*Update)(nil), "proxy.Update")
	proto.RegisterType((*ListenRequest)(nil), "proxy.ListenRequest")
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// Client API for UpdateStreamer service

type UpdateStreamerClient interface {
	ListenOnUpdates(ctx context.Context, in *ListenRequest, opts ...grpc.CallOption) (UpdateStreamer_ListenOnUpdatesClient, error)
}

type updateStreamerClient struct {
	cc *grpc.ClientConn
}

func NewUpdateStreamerClient(cc *grpc.ClientConn) UpdateStreamerClient {
	return &updateStreamerClient{cc}
}

func (c *updateStreamerClient) ListenOnUpdates(ctx context.Context, in *ListenRequest, opts ...grpc.CallOption) (UpdateStreamer_ListenOnUpdatesClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_UpdateStreamer_serviceDesc.Streams[0], c.cc, "/proxy.UpdateStreamer/ListenOnUpdates", opts...)
	if err != nil {
		return nil, err
	}
	x := &updateStreamerListenOnUpdatesClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type UpdateStreamer_ListenOnUpdatesClient interface {
	Recv() (*Update, error)
	grpc.ClientStream
}

type updateStreamerListenOnUpdatesClient struct {
	grpc.ClientStream
}

func (x *updateStreamerListenOnUpdatesClient) Recv() (*Update, error) {
	m := new(Update)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// Server API for UpdateStreamer service

type UpdateStreamerServer interface {
	ListenOnUpdates(*ListenRequest, UpdateStreamer_ListenOnUpdatesServer) error
}

func RegisterUpdateStreamerServer(s *grpc.Server, srv UpdateStreamerServer) {
	s.RegisterService(&_UpdateStreamer_serviceDesc, srv)
}

func _UpdateStreamer_ListenOnUpdates_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(ListenRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(UpdateStreamerServer).ListenOnUpdates(m, &updateStreamerListenOnUpdatesServer{stream})
}

type UpdateStreamer_ListenOnUpdatesServer interface {
	Send(*Update) error
	grpc.ServerStream
}

type updateStreamerListenOnUpdatesServer struct {
	grpc.ServerStream
}

func (x *updateStreamerListenOnUpdatesServer) Send(m *Update) error {
	return x.ServerStream.SendMsg(m)
}

var _UpdateStreamer_serviceDesc = grpc.ServiceDesc{
	ServiceName: "proxy.UpdateStreamer",
	HandlerType: (*UpdateStreamerServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListenOnUpdates",
			Handler:       _UpdateStreamer_ListenOnUpdates_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "tl_update.proto",
}

func init() { proto.RegisterFile("tl_update.proto", fileDescriptor_tl_update_1c97a93e1b72e269) }

var fileDescriptor_tl_update_1c97a93e1b72e269 = []byte{
	// 570 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x95, 0x5d, 0x6f, 0x12, 0x4f,
	0x14, 0xc6, 0xa7, 0xff, 0xbf, 0x80, 0x0e, 0x50, 0xda, 0x09, 0xd1, 0x29, 0x89, 0x6f, 0x68, 0xd4,
	0xc4, 0x64, 0x69, 0xea, 0x9d, 0x31, 0x31, 0x29, 0x35, 0x19, 0x23, 0x52, 0x1d, 0xb4, 0x5e, 0x19,
	0x5d, 0xe0, 0x00, 0xab, 0xcb, 0x0c, 0xee, 0x0e, 0xa1, 0x7c, 0x1e, 0xbf, 0xa8, 0xe9, 0xec, 0xc0,
	0xec, 0x2e, 0xb3, 0xdc, 0xc1, 0x79, 0x9e, 0xe7, 0x77, 0x5e, 0xd8, 0x2c, 0xb8, 0xa1, 0xc2, 0x1f,
	0xcb, 0xc5, 0xd8, 0x57, 0xe0, 0x2d, 0x22, 0xa9, 0x24, 0x29, 0x2d, 0x22, 0x79, 0xbd, 0x6e, 0xbd,
	0x9c, 0x06, 0x6a, 0xb6, 0x1c, 0x7a, 0x23, 0x39, 0xef, 0x8c, 0x7e, 0x49, 0x31, 0x8d, 0x41, 0xfe,
	0xee, 0xcc, 0x95, 0x36, 0x75, 0xd4, 0x7a, 0x01, 0xb1, 0xa7, 0xc2, 0x24, 0xd3, 0xfe, 0x5b, 0xc3,
	0xe5, 0xaf, 0x1a, 0x42, 0xde, 0xe2, 0x5a, 0xf2, 0x29, 0x1e, 0x28, 0x5f, 0x01, 0x3d, 0x78, 0x74,
	0xf0, 0xa2, 0x7a, 0x76, 0xe2, 0x99, 0xa4, 0xf7, 0x29, 0x82, 0x71, 0xda, 0xc0, 0x10, 0xcf, 0x04,
	0xc8, 0x67, 0x4c, 0x92, 0xef, 0x83, 0x99, 0x8c, 0xd4, 0x47, 0x88, 0x63, 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