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

// HelpGetInviteTextRequest represents TL type `help.getInviteText#4d392343`.
// Returns localized text of a text message with an invitation.
//
// See https://core.telegram.org/method/help.getInviteText for reference.
type HelpGetInviteTextRequest struct {
}

// HelpGetInviteTextRequestTypeID is TL type id of HelpGetInviteTextRequest.
const HelpGetInviteTextRequestTypeID = 0x4d392343

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

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*HelpGetInviteTextRequest) () string {
	return "help.getInviteText"
}

// TypeInfo returns info about TL type.
func ( *HelpGetInviteTextRequest) () tdp.Type {
	 := tdp.Type{
		Name: "help.getInviteText",
		ID:   HelpGetInviteTextRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *HelpGetInviteTextRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode help.getInviteText#4d392343 as nil")
	}
	.PutID(HelpGetInviteTextRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *HelpGetInviteTextRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode help.getInviteText#4d392343 as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *HelpGetInviteTextRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode help.getInviteText#4d392343 to nil")
	}
	if  := .ConsumeID(HelpGetInviteTextRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode help.getInviteText#4d392343: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *HelpGetInviteTextRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode help.getInviteText#4d392343 to nil")
	}
	return nil
}

// HelpGetInviteText invokes method help.getInviteText#4d392343 returning error if any.
// Returns localized text of a text message with an invitation.
//
// See https://core.telegram.org/method/help.getInviteText for reference.
func ( *Client) ( context.Context) (*HelpInviteText, error) {
	var  HelpInviteText

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