// Code generated by gotdgen, DO NOT EDIT.

package tg

import (
	
	
	
	
	

	

	
	
	
	
)

// No-op definition for keeping imports.
var (
	_ = bin.Buffer{}
	_ = context.Background()
	_ = fmt.Stringer(nil)
	_ = strings.Builder{}
	_ = errors.Is
	_ = multierr.AppendInto
	_ = sort.Ints
	_ = tdp.Format
	_ = tgerr.Error{}
	_ = tdjson.Encoder{}
)

// MessagesGetDialogUnreadMarksRequest represents TL type `messages.getDialogUnreadMarks#22e24e22`.
// Get dialogs manually marked as unread
//
// See https://core.telegram.org/method/messages.getDialogUnreadMarks for reference.
type MessagesGetDialogUnreadMarksRequest struct {
}

// MessagesGetDialogUnreadMarksRequestTypeID is TL type id of MessagesGetDialogUnreadMarksRequest.
const MessagesGetDialogUnreadMarksRequestTypeID = 0x22e24e22

// Ensuring interfaces in compile-time for MessagesGetDialogUnreadMarksRequest.
var (
	_ bin.Encoder     = &MessagesGetDialogUnreadMarksRequest{}
	_ bin.Decoder     = &MessagesGetDialogUnreadMarksRequest{}
	_ bin.BareEncoder = &MessagesGetDialogUnreadMarksRequest{}
	_ bin.BareDecoder = &MessagesGetDialogUnreadMarksRequest{}
)

func ( *MessagesGetDialogUnreadMarksRequest) () bool {
	if  == nil {
		return true
	}

	return true
}

// String implements fmt.Stringer.
func ( *MessagesGetDialogUnreadMarksRequest) () string {
	if  == nil {
		return "MessagesGetDialogUnreadMarksRequest(nil)"
	}
	type  MessagesGetDialogUnreadMarksRequest
	return fmt.Sprintf("MessagesGetDialogUnreadMarksRequest%+v", (*))
}

// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*MessagesGetDialogUnreadMarksRequest) () uint32 {
	return MessagesGetDialogUnreadMarksRequestTypeID
}

// TypeName returns name of type in TL schema.
func (*MessagesGetDialogUnreadMarksRequest) () string {
	return "messages.getDialogUnreadMarks"
}

// TypeInfo returns info about TL type.
func ( *MessagesGetDialogUnreadMarksRequest) () tdp.Type {
	 := tdp.Type{
		Name: "messages.getDialogUnreadMarks",
		ID:   MessagesGetDialogUnreadMarksRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *MessagesGetDialogUnreadMarksRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.getDialogUnreadMarks#22e24e22 as nil")
	}
	.PutID(MessagesGetDialogUnreadMarksRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *MessagesGetDialogUnreadMarksRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.getDialogUnreadMarks#22e24e22 as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *MessagesGetDialogUnreadMarksRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode messages.getDialogUnreadMarks#22e24e22 to nil")
	}
	if  := .ConsumeID(MessagesGetDialogUnreadMarksRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode messages.getDialogUnreadMarks#22e24e22: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *MessagesGetDialogUnreadMarksRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode messages.getDialogUnreadMarks#22e24e22 to nil")
	}
	return nil
}

// MessagesGetDialogUnreadMarks invokes method messages.getDialogUnreadMarks#22e24e22 returning error if any.
// Get dialogs manually marked as unread
//
// See https://core.telegram.org/method/messages.getDialogUnreadMarks for reference.
func ( *Client) ( context.Context) ([]DialogPeerClass, error) {
	var  DialogPeerClassVector

	 := &MessagesGetDialogUnreadMarksRequest{}
	if  := .rpc.Invoke(, , &);  != nil {
		return nil, 
	}
	return []DialogPeerClass(.Elems), nil
}