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

// MessagesDeleteParticipantReactionsRequest represents TL type `messages.deleteParticipantReactions#a0b80cf8`.
//
// See https://core.telegram.org/method/messages.deleteParticipantReactions for reference.
type MessagesDeleteParticipantReactionsRequest struct {
	// Peer field of MessagesDeleteParticipantReactionsRequest.
	Peer InputPeerClass
	// Participant field of MessagesDeleteParticipantReactionsRequest.
	Participant InputPeerClass
}

// MessagesDeleteParticipantReactionsRequestTypeID is TL type id of MessagesDeleteParticipantReactionsRequest.
const MessagesDeleteParticipantReactionsRequestTypeID = 0xa0b80cf8

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

func ( *MessagesDeleteParticipantReactionsRequest) () bool {
	if  == nil {
		return true
	}
	if !(.Peer == nil) {
		return false
	}
	if !(.Participant == nil) {
		return false
	}

	return true
}

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

// FillFrom fills MessagesDeleteParticipantReactionsRequest from given interface.
func ( *MessagesDeleteParticipantReactionsRequest) ( interface {
	() ( InputPeerClass)
	() ( InputPeerClass)
}) {
	.Peer = .()
	.Participant = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *MessagesDeleteParticipantReactionsRequest) () tdp.Type {
	 := tdp.Type{
		Name: "messages.deleteParticipantReactions",
		ID:   MessagesDeleteParticipantReactionsRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Peer",
			SchemaName: "peer",
		},
		{
			Name:       "Participant",
			SchemaName: "participant",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *MessagesDeleteParticipantReactionsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.deleteParticipantReactions#a0b80cf8 as nil")
	}
	.PutID(MessagesDeleteParticipantReactionsRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *MessagesDeleteParticipantReactionsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.deleteParticipantReactions#a0b80cf8 as nil")
	}
	if .Peer == nil {
		return fmt.Errorf("unable to encode messages.deleteParticipantReactions#a0b80cf8: field peer is nil")
	}
	if  := .Peer.Encode();  != nil {
		return fmt.Errorf("unable to encode messages.deleteParticipantReactions#a0b80cf8: field peer: %w", )
	}
	if .Participant == nil {
		return fmt.Errorf("unable to encode messages.deleteParticipantReactions#a0b80cf8: field participant is nil")
	}
	if  := .Participant.Encode();  != nil {
		return fmt.Errorf("unable to encode messages.deleteParticipantReactions#a0b80cf8: field participant: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *MessagesDeleteParticipantReactionsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode messages.deleteParticipantReactions#a0b80cf8 to nil")
	}
	{
		,  := DecodeInputPeer()
		if  != nil {
			return fmt.Errorf("unable to decode messages.deleteParticipantReactions#a0b80cf8: field peer: %w", )
		}
		.Peer = 
	}
	{
		,  := DecodeInputPeer()
		if  != nil {
			return fmt.Errorf("unable to decode messages.deleteParticipantReactions#a0b80cf8: field participant: %w", )
		}
		.Participant = 
	}
	return nil
}

// GetPeer returns value of Peer field.
func ( *MessagesDeleteParticipantReactionsRequest) () ( InputPeerClass) {
	if  == nil {
		return
	}
	return .Peer
}

// GetParticipant returns value of Participant field.
func ( *MessagesDeleteParticipantReactionsRequest) () ( InputPeerClass) {
	if  == nil {
		return
	}
	return .Participant
}

// MessagesDeleteParticipantReactions invokes method messages.deleteParticipantReactions#a0b80cf8 returning error if any.
//
// See https://core.telegram.org/method/messages.deleteParticipantReactions for reference.
func ( *Client) ( context.Context,  *MessagesDeleteParticipantReactionsRequest) (bool, error) {
	var  BoolBox

	if  := .rpc.Invoke(, , &);  != nil {
		return false, 
	}
	,  := .Bool.(*BoolTrue)
	return , nil
}