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

// BotsBotInfo represents TL type `bots.botInfo#e8a775b0`.
// Localized information about a bot.
//
// See https://core.telegram.org/constructor/bots.botInfo for reference.
type BotsBotInfo struct {
	// Bot name
	Name string
	// Bot about text
	About string
	// Bot description
	Description string
}

// BotsBotInfoTypeID is TL type id of BotsBotInfo.
const BotsBotInfoTypeID = 0xe8a775b0

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

func ( *BotsBotInfo) () bool {
	if  == nil {
		return true
	}
	if !(.Name == "") {
		return false
	}
	if !(.About == "") {
		return false
	}
	if !(.Description == "") {
		return false
	}

	return true
}

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

// FillFrom fills BotsBotInfo from given interface.
func ( *BotsBotInfo) ( interface {
	() ( string)
	() ( string)
	() ( string)
}) {
	.Name = .()
	.About = .()
	.Description = .()
}

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

// TypeName returns name of type in TL schema.
func (*BotsBotInfo) () string {
	return "bots.botInfo"
}

// TypeInfo returns info about TL type.
func ( *BotsBotInfo) () tdp.Type {
	 := tdp.Type{
		Name: "bots.botInfo",
		ID:   BotsBotInfoTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Name",
			SchemaName: "name",
		},
		{
			Name:       "About",
			SchemaName: "about",
		},
		{
			Name:       "Description",
			SchemaName: "description",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *BotsBotInfo) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode bots.botInfo#e8a775b0 as nil")
	}
	.PutID(BotsBotInfoTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *BotsBotInfo) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode bots.botInfo#e8a775b0 as nil")
	}
	.PutString(.Name)
	.PutString(.About)
	.PutString(.Description)
	return nil
}

// Decode implements bin.Decoder.
func ( *BotsBotInfo) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode bots.botInfo#e8a775b0 to nil")
	}
	if  := .ConsumeID(BotsBotInfoTypeID);  != nil {
		return fmt.Errorf("unable to decode bots.botInfo#e8a775b0: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *BotsBotInfo) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode bots.botInfo#e8a775b0 to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode bots.botInfo#e8a775b0: field name: %w", )
		}
		.Name = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode bots.botInfo#e8a775b0: field about: %w", )
		}
		.About = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode bots.botInfo#e8a775b0: field description: %w", )
		}
		.Description = 
	}
	return nil
}

// GetName returns value of Name field.
func ( *BotsBotInfo) () ( string) {
	if  == nil {
		return
	}
	return .Name
}

// GetAbout returns value of About field.
func ( *BotsBotInfo) () ( string) {
	if  == nil {
		return
	}
	return .About
}

// GetDescription returns value of Description field.
func ( *BotsBotInfo) () ( string) {
	if  == nil {
		return
	}
	return .Description
}