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

// StorageFileUnknown represents TL type `storage.fileUnknown#aa963b05`.
// Unknown type.
//
// See https://core.telegram.org/constructor/storage.fileUnknown for reference.
type StorageFileUnknown struct {
}

// StorageFileUnknownTypeID is TL type id of StorageFileUnknown.
const StorageFileUnknownTypeID = 0xaa963b05

// construct implements constructor of StorageFileTypeClass.
func ( StorageFileUnknown) () StorageFileTypeClass { return & }

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

	_ StorageFileTypeClass = &StorageFileUnknown{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*StorageFileUnknown) () string {
	return "storage.fileUnknown"
}

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

// Encode implements bin.Encoder.
func ( *StorageFileUnknown) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileUnknown#aa963b05 as nil")
	}
	.PutID(StorageFileUnknownTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *StorageFileUnknown) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileUnknown#aa963b05 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *StorageFileUnknown) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.fileUnknown#aa963b05 to nil")
	}
	return nil
}

// StorageFilePartial represents TL type `storage.filePartial#40bc6f52`.
// Part of a bigger file.
//
// See https://core.telegram.org/constructor/storage.filePartial for reference.
type StorageFilePartial struct {
}

// StorageFilePartialTypeID is TL type id of StorageFilePartial.
const StorageFilePartialTypeID = 0x40bc6f52

// construct implements constructor of StorageFileTypeClass.
func ( StorageFilePartial) () StorageFileTypeClass { return & }

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

	_ StorageFileTypeClass = &StorageFilePartial{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*StorageFilePartial) () string {
	return "storage.filePartial"
}

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

// Encode implements bin.Encoder.
func ( *StorageFilePartial) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.filePartial#40bc6f52 as nil")
	}
	.PutID(StorageFilePartialTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *StorageFilePartial) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.filePartial#40bc6f52 as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *StorageFilePartial) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.filePartial#40bc6f52 to nil")
	}
	if  := .ConsumeID(StorageFilePartialTypeID);  != nil {
		return fmt.Errorf("unable to decode storage.filePartial#40bc6f52: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *StorageFilePartial) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.filePartial#40bc6f52 to nil")
	}
	return nil
}

// StorageFileJpeg represents TL type `storage.fileJpeg#7efe0e`.
// JPEG image. MIME type: image/jpeg.
//
// See https://core.telegram.org/constructor/storage.fileJpeg for reference.
type StorageFileJpeg struct {
}

// StorageFileJpegTypeID is TL type id of StorageFileJpeg.
const StorageFileJpegTypeID = 0x7efe0e

// construct implements constructor of StorageFileTypeClass.
func ( StorageFileJpeg) () StorageFileTypeClass { return & }

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

	_ StorageFileTypeClass = &StorageFileJpeg{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*StorageFileJpeg) () string {
	return "storage.fileJpeg"
}

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

// Encode implements bin.Encoder.
func ( *StorageFileJpeg) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileJpeg#7efe0e as nil")
	}
	.PutID(StorageFileJpegTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *StorageFileJpeg) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileJpeg#7efe0e as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *StorageFileJpeg) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.fileJpeg#7efe0e to nil")
	}
	if  := .ConsumeID(StorageFileJpegTypeID);  != nil {
		return fmt.Errorf("unable to decode storage.fileJpeg#7efe0e: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *StorageFileJpeg) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.fileJpeg#7efe0e to nil")
	}
	return nil
}

// StorageFileGif represents TL type `storage.fileGif#cae1aadf`.
// GIF image. MIME type: image/gif.
//
// See https://core.telegram.org/constructor/storage.fileGif for reference.
type StorageFileGif struct {
}

// StorageFileGifTypeID is TL type id of StorageFileGif.
const StorageFileGifTypeID = 0xcae1aadf

// construct implements constructor of StorageFileTypeClass.
func ( StorageFileGif) () StorageFileTypeClass { return & }

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

	_ StorageFileTypeClass = &StorageFileGif{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*StorageFileGif) () string {
	return "storage.fileGif"
}

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

// Encode implements bin.Encoder.
func ( *StorageFileGif) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileGif#cae1aadf as nil")
	}
	.PutID(StorageFileGifTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *StorageFileGif) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileGif#cae1aadf as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *StorageFileGif) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.fileGif#cae1aadf to nil")
	}
	return nil
}

// StorageFilePng represents TL type `storage.filePng#a4f63c0`.
// PNG image. MIME type: image/png.
//
// See https://core.telegram.org/constructor/storage.filePng for reference.
type StorageFilePng struct {
}

// StorageFilePngTypeID is TL type id of StorageFilePng.
const StorageFilePngTypeID = 0xa4f63c0

// construct implements constructor of StorageFileTypeClass.
func ( StorageFilePng) () StorageFileTypeClass { return & }

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

	_ StorageFileTypeClass = &StorageFilePng{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*StorageFilePng) () string {
	return "storage.filePng"
}

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

// Encode implements bin.Encoder.
func ( *StorageFilePng) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.filePng#a4f63c0 as nil")
	}
	.PutID(StorageFilePngTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *StorageFilePng) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.filePng#a4f63c0 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *StorageFilePng) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.filePng#a4f63c0 to nil")
	}
	return nil
}

// StorageFilePdf represents TL type `storage.filePdf#ae1e508d`.
// PDF document image. MIME type: application/pdf.
//
// See https://core.telegram.org/constructor/storage.filePdf for reference.
type StorageFilePdf struct {
}

// StorageFilePdfTypeID is TL type id of StorageFilePdf.
const StorageFilePdfTypeID = 0xae1e508d

// construct implements constructor of StorageFileTypeClass.
func ( StorageFilePdf) () StorageFileTypeClass { return & }

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

	_ StorageFileTypeClass = &StorageFilePdf{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*StorageFilePdf) () string {
	return "storage.filePdf"
}

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

// Encode implements bin.Encoder.
func ( *StorageFilePdf) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.filePdf#ae1e508d as nil")
	}
	.PutID(StorageFilePdfTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *StorageFilePdf) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.filePdf#ae1e508d as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *StorageFilePdf) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.filePdf#ae1e508d to nil")
	}
	return nil
}

// StorageFileMp3 represents TL type `storage.fileMp3#528a0677`.
// Mp3 audio. MIME type: audio/mpeg.
//
// See https://core.telegram.org/constructor/storage.fileMp3 for reference.
type StorageFileMp3 struct {
}

// StorageFileMp3TypeID is TL type id of StorageFileMp3.
const StorageFileMp3TypeID = 0x528a0677

// construct implements constructor of StorageFileTypeClass.
func ( StorageFileMp3) () StorageFileTypeClass { return & }

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

	_ StorageFileTypeClass = &StorageFileMp3{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*StorageFileMp3) () string {
	return "storage.fileMp3"
}

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

// Encode implements bin.Encoder.
func ( *StorageFileMp3) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileMp3#528a0677 as nil")
	}
	.PutID(StorageFileMp3TypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *StorageFileMp3) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileMp3#528a0677 as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *StorageFileMp3) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.fileMp3#528a0677 to nil")
	}
	if  := .ConsumeID(StorageFileMp3TypeID);  != nil {
		return fmt.Errorf("unable to decode storage.fileMp3#528a0677: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *StorageFileMp3) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.fileMp3#528a0677 to nil")
	}
	return nil
}

// StorageFileMov represents TL type `storage.fileMov#4b09ebbc`.
// Quicktime video. MIME type: video/quicktime.
//
// See https://core.telegram.org/constructor/storage.fileMov for reference.
type StorageFileMov struct {
}

// StorageFileMovTypeID is TL type id of StorageFileMov.
const StorageFileMovTypeID = 0x4b09ebbc

// construct implements constructor of StorageFileTypeClass.
func ( StorageFileMov) () StorageFileTypeClass { return & }

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

	_ StorageFileTypeClass = &StorageFileMov{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*StorageFileMov) () string {
	return "storage.fileMov"
}

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

// Encode implements bin.Encoder.
func ( *StorageFileMov) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileMov#4b09ebbc as nil")
	}
	.PutID(StorageFileMovTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *StorageFileMov) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileMov#4b09ebbc as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *StorageFileMov) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.fileMov#4b09ebbc to nil")
	}
	if  := .ConsumeID(StorageFileMovTypeID);  != nil {
		return fmt.Errorf("unable to decode storage.fileMov#4b09ebbc: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *StorageFileMov) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.fileMov#4b09ebbc to nil")
	}
	return nil
}

// StorageFileMp4 represents TL type `storage.fileMp4#b3cea0e4`.
// MPEG-4 video. MIME type: video/mp4.
//
// See https://core.telegram.org/constructor/storage.fileMp4 for reference.
type StorageFileMp4 struct {
}

// StorageFileMp4TypeID is TL type id of StorageFileMp4.
const StorageFileMp4TypeID = 0xb3cea0e4

// construct implements constructor of StorageFileTypeClass.
func ( StorageFileMp4) () StorageFileTypeClass { return & }

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

	_ StorageFileTypeClass = &StorageFileMp4{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*StorageFileMp4) () string {
	return "storage.fileMp4"
}

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

// Encode implements bin.Encoder.
func ( *StorageFileMp4) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileMp4#b3cea0e4 as nil")
	}
	.PutID(StorageFileMp4TypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *StorageFileMp4) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileMp4#b3cea0e4 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *StorageFileMp4) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.fileMp4#b3cea0e4 to nil")
	}
	return nil
}

// StorageFileWebp represents TL type `storage.fileWebp#1081464c`.
// WEBP image. MIME type: image/webp.
//
// See https://core.telegram.org/constructor/storage.fileWebp for reference.
type StorageFileWebp struct {
}

// StorageFileWebpTypeID is TL type id of StorageFileWebp.
const StorageFileWebpTypeID = 0x1081464c

// construct implements constructor of StorageFileTypeClass.
func ( StorageFileWebp) () StorageFileTypeClass { return & }

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

	_ StorageFileTypeClass = &StorageFileWebp{}
)

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*StorageFileWebp) () string {
	return "storage.fileWebp"
}

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

// Encode implements bin.Encoder.
func ( *StorageFileWebp) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileWebp#1081464c as nil")
	}
	.PutID(StorageFileWebpTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *StorageFileWebp) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode storage.fileWebp#1081464c as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *StorageFileWebp) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.fileWebp#1081464c to nil")
	}
	if  := .ConsumeID(StorageFileWebpTypeID);  != nil {
		return fmt.Errorf("unable to decode storage.fileWebp#1081464c: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *StorageFileWebp) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode storage.fileWebp#1081464c to nil")
	}
	return nil
}

// StorageFileTypeClassName is schema name of StorageFileTypeClass.
const StorageFileTypeClassName = "storage.FileType"

// StorageFileTypeClass represents storage.FileType generic type.
//
// See https://core.telegram.org/type/storage.FileType for reference.
//
// Example:
//
//	g, err := tg.DecodeStorageFileType(buf)
//	if err != nil {
//	    panic(err)
//	}
//	switch v := g.(type) {
//	case *tg.StorageFileUnknown: // storage.fileUnknown#aa963b05
//	case *tg.StorageFilePartial: // storage.filePartial#40bc6f52
//	case *tg.StorageFileJpeg: // storage.fileJpeg#7efe0e
//	case *tg.StorageFileGif: // storage.fileGif#cae1aadf
//	case *tg.StorageFilePng: // storage.filePng#a4f63c0
//	case *tg.StorageFilePdf: // storage.filePdf#ae1e508d
//	case *tg.StorageFileMp3: // storage.fileMp3#528a0677
//	case *tg.StorageFileMov: // storage.fileMov#4b09ebbc
//	case *tg.StorageFileMp4: // storage.fileMp4#b3cea0e4
//	case *tg.StorageFileWebp: // storage.fileWebp#1081464c
//	default: panic(v)
//	}
type StorageFileTypeClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() StorageFileTypeClass

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

// DecodeStorageFileType implements binary de-serialization for StorageFileTypeClass.
func ( *bin.Buffer) (StorageFileTypeClass, error) {
	,  := .PeekID()
	if  != nil {
		return nil, 
	}
	switch  {
	case StorageFileUnknownTypeID:
		// Decoding storage.fileUnknown#aa963b05.
		 := StorageFileUnknown{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode StorageFileTypeClass: %w", )
		}
		return &, nil
	case StorageFilePartialTypeID:
		// Decoding storage.filePartial#40bc6f52.
		 := StorageFilePartial{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode StorageFileTypeClass: %w", )
		}
		return &, nil
	case StorageFileJpegTypeID:
		// Decoding storage.fileJpeg#7efe0e.
		 := StorageFileJpeg{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode StorageFileTypeClass: %w", )
		}
		return &, nil
	case StorageFileGifTypeID:
		// Decoding storage.fileGif#cae1aadf.
		 := StorageFileGif{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode StorageFileTypeClass: %w", )
		}
		return &, nil
	case StorageFilePngTypeID:
		// Decoding storage.filePng#a4f63c0.
		 := StorageFilePng{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode StorageFileTypeClass: %w", )
		}
		return &, nil
	case StorageFilePdfTypeID:
		// Decoding storage.filePdf#ae1e508d.
		 := StorageFilePdf{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode StorageFileTypeClass: %w", )
		}
		return &, nil
	case StorageFileMp3TypeID:
		// Decoding storage.fileMp3#528a0677.
		 := StorageFileMp3{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode StorageFileTypeClass: %w", )
		}
		return &, nil
	case StorageFileMovTypeID:
		// Decoding storage.fileMov#4b09ebbc.
		 := StorageFileMov{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode StorageFileTypeClass: %w", )
		}
		return &, nil
	case StorageFileMp4TypeID:
		// Decoding storage.fileMp4#b3cea0e4.
		 := StorageFileMp4{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode StorageFileTypeClass: %w", )
		}
		return &, nil
	case StorageFileWebpTypeID:
		// Decoding storage.fileWebp#1081464c.
		 := StorageFileWebp{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode StorageFileTypeClass: %w", )
		}
		return &, nil
	default:
		return nil, fmt.Errorf("unable to decode StorageFileTypeClass: %w", bin.NewUnexpectedID())
	}
}

// StorageFileType boxes the StorageFileTypeClass providing a helper.
type StorageFileTypeBox struct {
	FileType StorageFileTypeClass
}

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

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