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

// InputReportReasonSpam represents TL type `inputReportReasonSpam#58dbcab8`.
// Report for spam
//
// See https://core.telegram.org/constructor/inputReportReasonSpam for reference.
type InputReportReasonSpam struct {
}

// InputReportReasonSpamTypeID is TL type id of InputReportReasonSpam.
const InputReportReasonSpamTypeID = 0x58dbcab8

// construct implements constructor of ReportReasonClass.
func ( InputReportReasonSpam) () ReportReasonClass { return & }

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

	_ ReportReasonClass = &InputReportReasonSpam{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*InputReportReasonSpam) () string {
	return "inputReportReasonSpam"
}

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

// Encode implements bin.Encoder.
func ( *InputReportReasonSpam) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonSpam#58dbcab8 as nil")
	}
	.PutID(InputReportReasonSpamTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputReportReasonSpam) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonSpam#58dbcab8 as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *InputReportReasonSpam) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonSpam#58dbcab8 to nil")
	}
	if  := .ConsumeID(InputReportReasonSpamTypeID);  != nil {
		return fmt.Errorf("unable to decode inputReportReasonSpam#58dbcab8: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *InputReportReasonSpam) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonSpam#58dbcab8 to nil")
	}
	return nil
}

// InputReportReasonViolence represents TL type `inputReportReasonViolence#1e22c78d`.
// Report for violence
//
// See https://core.telegram.org/constructor/inputReportReasonViolence for reference.
type InputReportReasonViolence struct {
}

// InputReportReasonViolenceTypeID is TL type id of InputReportReasonViolence.
const InputReportReasonViolenceTypeID = 0x1e22c78d

// construct implements constructor of ReportReasonClass.
func ( InputReportReasonViolence) () ReportReasonClass { return & }

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

	_ ReportReasonClass = &InputReportReasonViolence{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*InputReportReasonViolence) () string {
	return "inputReportReasonViolence"
}

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

// Encode implements bin.Encoder.
func ( *InputReportReasonViolence) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonViolence#1e22c78d as nil")
	}
	.PutID(InputReportReasonViolenceTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputReportReasonViolence) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonViolence#1e22c78d as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *InputReportReasonViolence) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonViolence#1e22c78d to nil")
	}
	if  := .ConsumeID(InputReportReasonViolenceTypeID);  != nil {
		return fmt.Errorf("unable to decode inputReportReasonViolence#1e22c78d: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *InputReportReasonViolence) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonViolence#1e22c78d to nil")
	}
	return nil
}

// InputReportReasonPornography represents TL type `inputReportReasonPornography#2e59d922`.
// Report for pornography
//
// See https://core.telegram.org/constructor/inputReportReasonPornography for reference.
type InputReportReasonPornography struct {
}

// InputReportReasonPornographyTypeID is TL type id of InputReportReasonPornography.
const InputReportReasonPornographyTypeID = 0x2e59d922

// construct implements constructor of ReportReasonClass.
func ( InputReportReasonPornography) () ReportReasonClass { return & }

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

	_ ReportReasonClass = &InputReportReasonPornography{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*InputReportReasonPornography) () string {
	return "inputReportReasonPornography"
}

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

// Encode implements bin.Encoder.
func ( *InputReportReasonPornography) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonPornography#2e59d922 as nil")
	}
	.PutID(InputReportReasonPornographyTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputReportReasonPornography) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonPornography#2e59d922 as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *InputReportReasonPornography) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonPornography#2e59d922 to nil")
	}
	if  := .ConsumeID(InputReportReasonPornographyTypeID);  != nil {
		return fmt.Errorf("unable to decode inputReportReasonPornography#2e59d922: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *InputReportReasonPornography) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonPornography#2e59d922 to nil")
	}
	return nil
}

// InputReportReasonChildAbuse represents TL type `inputReportReasonChildAbuse#adf44ee3`.
// Report for child abuse
//
// See https://core.telegram.org/constructor/inputReportReasonChildAbuse for reference.
type InputReportReasonChildAbuse struct {
}

// InputReportReasonChildAbuseTypeID is TL type id of InputReportReasonChildAbuse.
const InputReportReasonChildAbuseTypeID = 0xadf44ee3

// construct implements constructor of ReportReasonClass.
func ( InputReportReasonChildAbuse) () ReportReasonClass { return & }

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

	_ ReportReasonClass = &InputReportReasonChildAbuse{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*InputReportReasonChildAbuse) () string {
	return "inputReportReasonChildAbuse"
}

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

// Encode implements bin.Encoder.
func ( *InputReportReasonChildAbuse) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonChildAbuse#adf44ee3 as nil")
	}
	.PutID(InputReportReasonChildAbuseTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputReportReasonChildAbuse) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonChildAbuse#adf44ee3 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputReportReasonChildAbuse) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonChildAbuse#adf44ee3 to nil")
	}
	return nil
}

// InputReportReasonOther represents TL type `inputReportReasonOther#c1e4a2b1`.
// Other
//
// See https://core.telegram.org/constructor/inputReportReasonOther for reference.
type InputReportReasonOther struct {
}

// InputReportReasonOtherTypeID is TL type id of InputReportReasonOther.
const InputReportReasonOtherTypeID = 0xc1e4a2b1

// construct implements constructor of ReportReasonClass.
func ( InputReportReasonOther) () ReportReasonClass { return & }

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

	_ ReportReasonClass = &InputReportReasonOther{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*InputReportReasonOther) () string {
	return "inputReportReasonOther"
}

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

// Encode implements bin.Encoder.
func ( *InputReportReasonOther) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonOther#c1e4a2b1 as nil")
	}
	.PutID(InputReportReasonOtherTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputReportReasonOther) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonOther#c1e4a2b1 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputReportReasonOther) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonOther#c1e4a2b1 to nil")
	}
	return nil
}

// InputReportReasonCopyright represents TL type `inputReportReasonCopyright#9b89f93a`.
// Report for copyrighted content
//
// See https://core.telegram.org/constructor/inputReportReasonCopyright for reference.
type InputReportReasonCopyright struct {
}

// InputReportReasonCopyrightTypeID is TL type id of InputReportReasonCopyright.
const InputReportReasonCopyrightTypeID = 0x9b89f93a

// construct implements constructor of ReportReasonClass.
func ( InputReportReasonCopyright) () ReportReasonClass { return & }

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

	_ ReportReasonClass = &InputReportReasonCopyright{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*InputReportReasonCopyright) () string {
	return "inputReportReasonCopyright"
}

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

// Encode implements bin.Encoder.
func ( *InputReportReasonCopyright) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonCopyright#9b89f93a as nil")
	}
	.PutID(InputReportReasonCopyrightTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputReportReasonCopyright) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonCopyright#9b89f93a as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *InputReportReasonCopyright) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonCopyright#9b89f93a to nil")
	}
	if  := .ConsumeID(InputReportReasonCopyrightTypeID);  != nil {
		return fmt.Errorf("unable to decode inputReportReasonCopyright#9b89f93a: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *InputReportReasonCopyright) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonCopyright#9b89f93a to nil")
	}
	return nil
}

// InputReportReasonGeoIrrelevant represents TL type `inputReportReasonGeoIrrelevant#dbd4feed`.
// Report an irrelevant geogroup
//
// See https://core.telegram.org/constructor/inputReportReasonGeoIrrelevant for reference.
type InputReportReasonGeoIrrelevant struct {
}

// InputReportReasonGeoIrrelevantTypeID is TL type id of InputReportReasonGeoIrrelevant.
const InputReportReasonGeoIrrelevantTypeID = 0xdbd4feed

// construct implements constructor of ReportReasonClass.
func ( InputReportReasonGeoIrrelevant) () ReportReasonClass { return & }

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

	_ ReportReasonClass = &InputReportReasonGeoIrrelevant{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*InputReportReasonGeoIrrelevant) () string {
	return "inputReportReasonGeoIrrelevant"
}

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

// Encode implements bin.Encoder.
func ( *InputReportReasonGeoIrrelevant) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonGeoIrrelevant#dbd4feed as nil")
	}
	.PutID(InputReportReasonGeoIrrelevantTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputReportReasonGeoIrrelevant) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonGeoIrrelevant#dbd4feed as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputReportReasonGeoIrrelevant) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonGeoIrrelevant#dbd4feed to nil")
	}
	return nil
}

// InputReportReasonFake represents TL type `inputReportReasonFake#f5ddd6e7`.
// Report for impersonation
//
// See https://core.telegram.org/constructor/inputReportReasonFake for reference.
type InputReportReasonFake struct {
}

// InputReportReasonFakeTypeID is TL type id of InputReportReasonFake.
const InputReportReasonFakeTypeID = 0xf5ddd6e7

// construct implements constructor of ReportReasonClass.
func ( InputReportReasonFake) () ReportReasonClass { return & }

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

	_ ReportReasonClass = &InputReportReasonFake{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*InputReportReasonFake) () string {
	return "inputReportReasonFake"
}

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

// Encode implements bin.Encoder.
func ( *InputReportReasonFake) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonFake#f5ddd6e7 as nil")
	}
	.PutID(InputReportReasonFakeTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputReportReasonFake) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonFake#f5ddd6e7 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputReportReasonFake) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonFake#f5ddd6e7 to nil")
	}
	return nil
}

// InputReportReasonIllegalDrugs represents TL type `inputReportReasonIllegalDrugs#a8eb2be`.
// Report for illegal drugs
//
// See https://core.telegram.org/constructor/inputReportReasonIllegalDrugs for reference.
type InputReportReasonIllegalDrugs struct {
}

// InputReportReasonIllegalDrugsTypeID is TL type id of InputReportReasonIllegalDrugs.
const InputReportReasonIllegalDrugsTypeID = 0xa8eb2be

// construct implements constructor of ReportReasonClass.
func ( InputReportReasonIllegalDrugs) () ReportReasonClass { return & }

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

	_ ReportReasonClass = &InputReportReasonIllegalDrugs{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*InputReportReasonIllegalDrugs) () string {
	return "inputReportReasonIllegalDrugs"
}

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

// Encode implements bin.Encoder.
func ( *InputReportReasonIllegalDrugs) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonIllegalDrugs#a8eb2be as nil")
	}
	.PutID(InputReportReasonIllegalDrugsTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputReportReasonIllegalDrugs) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonIllegalDrugs#a8eb2be as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputReportReasonIllegalDrugs) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonIllegalDrugs#a8eb2be to nil")
	}
	return nil
}

// InputReportReasonPersonalDetails represents TL type `inputReportReasonPersonalDetails#9ec7863d`.
// Report for divulgation of personal details
//
// See https://core.telegram.org/constructor/inputReportReasonPersonalDetails for reference.
type InputReportReasonPersonalDetails struct {
}

// InputReportReasonPersonalDetailsTypeID is TL type id of InputReportReasonPersonalDetails.
const InputReportReasonPersonalDetailsTypeID = 0x9ec7863d

// construct implements constructor of ReportReasonClass.
func ( InputReportReasonPersonalDetails) () ReportReasonClass { return & }

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

	_ ReportReasonClass = &InputReportReasonPersonalDetails{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*InputReportReasonPersonalDetails) () string {
	return "inputReportReasonPersonalDetails"
}

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

// Encode implements bin.Encoder.
func ( *InputReportReasonPersonalDetails) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonPersonalDetails#9ec7863d as nil")
	}
	.PutID(InputReportReasonPersonalDetailsTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputReportReasonPersonalDetails) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputReportReasonPersonalDetails#9ec7863d as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *InputReportReasonPersonalDetails) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonPersonalDetails#9ec7863d to nil")
	}
	if  := .ConsumeID(InputReportReasonPersonalDetailsTypeID);  != nil {
		return fmt.Errorf("unable to decode inputReportReasonPersonalDetails#9ec7863d: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *InputReportReasonPersonalDetails) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputReportReasonPersonalDetails#9ec7863d to nil")
	}
	return nil
}

// ReportReasonClassName is schema name of ReportReasonClass.
const ReportReasonClassName = "ReportReason"

// ReportReasonClass represents ReportReason generic type.
//
// See https://core.telegram.org/type/ReportReason for reference.
//
// Example:
//
//	g, err := tg.DecodeReportReason(buf)
//	if err != nil {
//	    panic(err)
//	}
//	switch v := g.(type) {
//	case *tg.InputReportReasonSpam: // inputReportReasonSpam#58dbcab8
//	case *tg.InputReportReasonViolence: // inputReportReasonViolence#1e22c78d
//	case *tg.InputReportReasonPornography: // inputReportReasonPornography#2e59d922
//	case *tg.InputReportReasonChildAbuse: // inputReportReasonChildAbuse#adf44ee3
//	case *tg.InputReportReasonOther: // inputReportReasonOther#c1e4a2b1
//	case *tg.InputReportReasonCopyright: // inputReportReasonCopyright#9b89f93a
//	case *tg.InputReportReasonGeoIrrelevant: // inputReportReasonGeoIrrelevant#dbd4feed
//	case *tg.InputReportReasonFake: // inputReportReasonFake#f5ddd6e7
//	case *tg.InputReportReasonIllegalDrugs: // inputReportReasonIllegalDrugs#a8eb2be
//	case *tg.InputReportReasonPersonalDetails: // inputReportReasonPersonalDetails#9ec7863d
//	default: panic(v)
//	}
type ReportReasonClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() ReportReasonClass

	// TypeID returns type id in TL schema.
	//
	// See https://core.telegram.org/mtproto/TL-tl#remarks.
	TypeID() uint32
	// TypeName returns name of type in TL schema.
	TypeName() string
	// String implements fmt.Stringer.
	String() string
	// Zero returns true if current object has a zero value.
	Zero() bool
}

// DecodeReportReason implements binary de-serialization for ReportReasonClass.
func ( *bin.Buffer) (ReportReasonClass, error) {
	,  := .PeekID()
	if  != nil {
		return nil, 
	}
	switch  {
	case InputReportReasonSpamTypeID:
		// Decoding inputReportReasonSpam#58dbcab8.
		 := InputReportReasonSpam{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ReportReasonClass: %w", )
		}
		return &, nil
	case InputReportReasonViolenceTypeID:
		// Decoding inputReportReasonViolence#1e22c78d.
		 := InputReportReasonViolence{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ReportReasonClass: %w", )
		}
		return &, nil
	case InputReportReasonPornographyTypeID:
		// Decoding inputReportReasonPornography#2e59d922.
		 := InputReportReasonPornography{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ReportReasonClass: %w", )
		}
		return &, nil
	case InputReportReasonChildAbuseTypeID:
		// Decoding inputReportReasonChildAbuse#adf44ee3.
		 := InputReportReasonChildAbuse{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ReportReasonClass: %w", )
		}
		return &, nil
	case InputReportReasonOtherTypeID:
		// Decoding inputReportReasonOther#c1e4a2b1.
		 := InputReportReasonOther{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ReportReasonClass: %w", )
		}
		return &, nil
	case InputReportReasonCopyrightTypeID:
		// Decoding inputReportReasonCopyright#9b89f93a.
		 := InputReportReasonCopyright{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ReportReasonClass: %w", )
		}
		return &, nil
	case InputReportReasonGeoIrrelevantTypeID:
		// Decoding inputReportReasonGeoIrrelevant#dbd4feed.
		 := InputReportReasonGeoIrrelevant{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ReportReasonClass: %w", )
		}
		return &, nil
	case InputReportReasonFakeTypeID:
		// Decoding inputReportReasonFake#f5ddd6e7.
		 := InputReportReasonFake{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ReportReasonClass: %w", )
		}
		return &, nil
	case InputReportReasonIllegalDrugsTypeID:
		// Decoding inputReportReasonIllegalDrugs#a8eb2be.
		 := InputReportReasonIllegalDrugs{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ReportReasonClass: %w", )
		}
		return &, nil
	case InputReportReasonPersonalDetailsTypeID:
		// Decoding inputReportReasonPersonalDetails#9ec7863d.
		 := InputReportReasonPersonalDetails{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ReportReasonClass: %w", )
		}
		return &, nil
	default:
		return nil, fmt.Errorf("unable to decode ReportReasonClass: %w", bin.NewUnexpectedID())
	}
}

// ReportReason boxes the ReportReasonClass providing a helper.
type ReportReasonBox struct {
	ReportReason ReportReasonClass
}

// Decode implements bin.Decoder for ReportReasonBox.
func ( *ReportReasonBox) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("unable to decode ReportReasonBox to nil")
	}
	,  := DecodeReportReason()
	if  != nil {
		return fmt.Errorf("unable to decode boxed value: %w", )
	}
	.ReportReason = 
	return nil
}

// Encode implements bin.Encode for ReportReasonBox.
func ( *ReportReasonBox) ( *bin.Buffer) error {
	if  == nil || .ReportReason == nil {
		return fmt.Errorf("unable to encode ReportReasonClass as nil")
	}
	return .ReportReason.Encode()
}