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

// AccountGetChannelDefaultEmojiStatusesRequest represents TL type `account.getChannelDefaultEmojiStatuses#7727a7d5`.
//
// See https://core.telegram.org/method/account.getChannelDefaultEmojiStatuses for reference.
type AccountGetChannelDefaultEmojiStatusesRequest struct {
	// Hash field of AccountGetChannelDefaultEmojiStatusesRequest.
	Hash int64
}

// AccountGetChannelDefaultEmojiStatusesRequestTypeID is TL type id of AccountGetChannelDefaultEmojiStatusesRequest.
const AccountGetChannelDefaultEmojiStatusesRequestTypeID = 0x7727a7d5

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

func ( *AccountGetChannelDefaultEmojiStatusesRequest) () bool {
	if  == nil {
		return true
	}
	if !(.Hash == 0) {
		return false
	}

	return true
}

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

// FillFrom fills AccountGetChannelDefaultEmojiStatusesRequest from given interface.
func ( *AccountGetChannelDefaultEmojiStatusesRequest) ( interface {
	() ( int64)
}) {
	.Hash = .()
}

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

// TypeName returns name of type in TL schema.
func (*AccountGetChannelDefaultEmojiStatusesRequest) () string {
	return "account.getChannelDefaultEmojiStatuses"
}

// TypeInfo returns info about TL type.
func ( *AccountGetChannelDefaultEmojiStatusesRequest) () tdp.Type {
	 := tdp.Type{
		Name: "account.getChannelDefaultEmojiStatuses",
		ID:   AccountGetChannelDefaultEmojiStatusesRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Hash",
			SchemaName: "hash",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *AccountGetChannelDefaultEmojiStatusesRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode account.getChannelDefaultEmojiStatuses#7727a7d5 as nil")
	}
	.PutID(AccountGetChannelDefaultEmojiStatusesRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *AccountGetChannelDefaultEmojiStatusesRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode account.getChannelDefaultEmojiStatuses#7727a7d5 as nil")
	}
	.PutLong(.Hash)
	return nil
}

// Decode implements bin.Decoder.
func ( *AccountGetChannelDefaultEmojiStatusesRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode account.getChannelDefaultEmojiStatuses#7727a7d5 to nil")
	}
	if  := .ConsumeID(AccountGetChannelDefaultEmojiStatusesRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode account.getChannelDefaultEmojiStatuses#7727a7d5: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *AccountGetChannelDefaultEmojiStatusesRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode account.getChannelDefaultEmojiStatuses#7727a7d5 to nil")
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode account.getChannelDefaultEmojiStatuses#7727a7d5: field hash: %w", )
		}
		.Hash = 
	}
	return nil
}

// GetHash returns value of Hash field.
func ( *AccountGetChannelDefaultEmojiStatusesRequest) () ( int64) {
	if  == nil {
		return
	}
	return .Hash
}

// AccountGetChannelDefaultEmojiStatuses invokes method account.getChannelDefaultEmojiStatuses#7727a7d5 returning error if any.
//
// See https://core.telegram.org/method/account.getChannelDefaultEmojiStatuses for reference.
func ( *Client) ( context.Context,  int64) (AccountEmojiStatusesClass, error) {
	var  AccountEmojiStatusesBox

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