// 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{}
)

// ChannelsGetInactiveChannelsRequest represents TL type `channels.getInactiveChannels#11e831ee`.
// Get inactive channels and supergroups
//
// See https://core.telegram.org/method/channels.getInactiveChannels for reference.
type ChannelsGetInactiveChannelsRequest struct {
}

// ChannelsGetInactiveChannelsRequestTypeID is TL type id of ChannelsGetInactiveChannelsRequest.
const ChannelsGetInactiveChannelsRequestTypeID = 0x11e831ee

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

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*ChannelsGetInactiveChannelsRequest) () string {
	return "channels.getInactiveChannels"
}

// TypeInfo returns info about TL type.
func ( *ChannelsGetInactiveChannelsRequest) () tdp.Type {
	 := tdp.Type{
		Name: "channels.getInactiveChannels",
		ID:   ChannelsGetInactiveChannelsRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelsGetInactiveChannelsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channels.getInactiveChannels#11e831ee as nil")
	}
	.PutID(ChannelsGetInactiveChannelsRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelsGetInactiveChannelsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channels.getInactiveChannels#11e831ee as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *ChannelsGetInactiveChannelsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channels.getInactiveChannels#11e831ee to nil")
	}
	if  := .ConsumeID(ChannelsGetInactiveChannelsRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode channels.getInactiveChannels#11e831ee: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *ChannelsGetInactiveChannelsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channels.getInactiveChannels#11e831ee to nil")
	}
	return nil
}

// ChannelsGetInactiveChannels invokes method channels.getInactiveChannels#11e831ee returning error if any.
// Get inactive channels and supergroups
//
// See https://core.telegram.org/method/channels.getInactiveChannels for reference.
func ( *Client) ( context.Context) (*MessagesInactiveChats, error) {
	var  MessagesInactiveChats

	 := &ChannelsGetInactiveChannelsRequest{}
	if  := .rpc.Invoke(, , &);  != nil {
		return nil, 
	}
	return &, nil
}