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

// InputEncryptedFileEmpty represents TL type `inputEncryptedFileEmpty#1837c364`.
// Empty constructor.
//
// See https://core.telegram.org/constructor/inputEncryptedFileEmpty for reference.
type InputEncryptedFileEmpty struct {
}

// InputEncryptedFileEmptyTypeID is TL type id of InputEncryptedFileEmpty.
const InputEncryptedFileEmptyTypeID = 0x1837c364

// construct implements constructor of InputEncryptedFileClass.
func ( InputEncryptedFileEmpty) () InputEncryptedFileClass { return & }

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

	_ InputEncryptedFileClass = &InputEncryptedFileEmpty{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *InputEncryptedFileEmpty) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputEncryptedFileEmpty#1837c364 as nil")
	}
	.PutID(InputEncryptedFileEmptyTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputEncryptedFileEmpty) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputEncryptedFileEmpty#1837c364 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputEncryptedFileEmpty) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputEncryptedFileEmpty#1837c364 to nil")
	}
	return nil
}

// InputEncryptedFileUploaded represents TL type `inputEncryptedFileUploaded#64bd0306`.
// Sets new encrypted file saved by parts using upload.saveFilePart method.
//
// See https://core.telegram.org/constructor/inputEncryptedFileUploaded for reference.
type InputEncryptedFileUploaded struct {
	// Random file ID created by client
	ID int64
	// Number of saved parts
	Parts int
	// In case md5-HASH¹ of the (already encrypted) file was transmitted, file content will
	// be checked prior to use
	//
	// Links:
	//  1) https://en.wikipedia.org/wiki/MD5
	MD5Checksum string
	// 32-bit fingerprint of the key used to encrypt a file
	KeyFingerprint int
}

// InputEncryptedFileUploadedTypeID is TL type id of InputEncryptedFileUploaded.
const InputEncryptedFileUploadedTypeID = 0x64bd0306

// construct implements constructor of InputEncryptedFileClass.
func ( InputEncryptedFileUploaded) () InputEncryptedFileClass { return & }

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

	_ InputEncryptedFileClass = &InputEncryptedFileUploaded{}
)

func ( *InputEncryptedFileUploaded) () bool {
	if  == nil {
		return true
	}
	if !(.ID == 0) {
		return false
	}
	if !(.Parts == 0) {
		return false
	}
	if !(.MD5Checksum == "") {
		return false
	}
	if !(.KeyFingerprint == 0) {
		return false
	}

	return true
}

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

// FillFrom fills InputEncryptedFileUploaded from given interface.
func ( *InputEncryptedFileUploaded) ( interface {
	() ( int64)
	() ( int)
	() ( string)
	() ( int)
}) {
	.ID = .()
	.Parts = .()
	.MD5Checksum = .()
	.KeyFingerprint = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *InputEncryptedFileUploaded) () tdp.Type {
	 := tdp.Type{
		Name: "inputEncryptedFileUploaded",
		ID:   InputEncryptedFileUploadedTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "ID",
			SchemaName: "id",
		},
		{
			Name:       "Parts",
			SchemaName: "parts",
		},
		{
			Name:       "MD5Checksum",
			SchemaName: "md5_checksum",
		},
		{
			Name:       "KeyFingerprint",
			SchemaName: "key_fingerprint",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *InputEncryptedFileUploaded) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputEncryptedFileUploaded#64bd0306 as nil")
	}
	.PutID(InputEncryptedFileUploadedTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputEncryptedFileUploaded) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputEncryptedFileUploaded#64bd0306 as nil")
	}
	.PutLong(.ID)
	.PutInt(.Parts)
	.PutString(.MD5Checksum)
	.PutInt(.KeyFingerprint)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputEncryptedFileUploaded) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputEncryptedFileUploaded#64bd0306 to nil")
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode inputEncryptedFileUploaded#64bd0306: field id: %w", )
		}
		.ID = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode inputEncryptedFileUploaded#64bd0306: field parts: %w", )
		}
		.Parts = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode inputEncryptedFileUploaded#64bd0306: field md5_checksum: %w", )
		}
		.MD5Checksum = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode inputEncryptedFileUploaded#64bd0306: field key_fingerprint: %w", )
		}
		.KeyFingerprint = 
	}
	return nil
}

// GetID returns value of ID field.
func ( *InputEncryptedFileUploaded) () ( int64) {
	if  == nil {
		return
	}
	return .ID
}

// GetParts returns value of Parts field.
func ( *InputEncryptedFileUploaded) () ( int) {
	if  == nil {
		return
	}
	return .Parts
}

// GetMD5Checksum returns value of MD5Checksum field.
func ( *InputEncryptedFileUploaded) () ( string) {
	if  == nil {
		return
	}
	return .MD5Checksum
}

// GetKeyFingerprint returns value of KeyFingerprint field.
func ( *InputEncryptedFileUploaded) () ( int) {
	if  == nil {
		return
	}
	return .KeyFingerprint
}

// InputEncryptedFile represents TL type `inputEncryptedFile#5a17b5e5`.
// Sets forwarded encrypted file for attachment.
//
// See https://core.telegram.org/constructor/inputEncryptedFile for reference.
type InputEncryptedFile struct {
	// File ID, value of id parameter from encryptedFile¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/encryptedFile
	ID int64
	// Checking sum, value of access_hash parameter from encryptedFile¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/encryptedFile
	AccessHash int64
}

// InputEncryptedFileTypeID is TL type id of InputEncryptedFile.
const InputEncryptedFileTypeID = 0x5a17b5e5

// construct implements constructor of InputEncryptedFileClass.
func ( InputEncryptedFile) () InputEncryptedFileClass { return & }

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

	_ InputEncryptedFileClass = &InputEncryptedFile{}
)

func ( *InputEncryptedFile) () bool {
	if  == nil {
		return true
	}
	if !(.ID == 0) {
		return false
	}
	if !(.AccessHash == 0) {
		return false
	}

	return true
}

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

// FillFrom fills InputEncryptedFile from given interface.
func ( *InputEncryptedFile) ( interface {
	() ( int64)
	() ( int64)
}) {
	.ID = .()
	.AccessHash = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *InputEncryptedFile) () tdp.Type {
	 := tdp.Type{
		Name: "inputEncryptedFile",
		ID:   InputEncryptedFileTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "ID",
			SchemaName: "id",
		},
		{
			Name:       "AccessHash",
			SchemaName: "access_hash",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *InputEncryptedFile) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputEncryptedFile#5a17b5e5 as nil")
	}
	.PutID(InputEncryptedFileTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputEncryptedFile) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputEncryptedFile#5a17b5e5 as nil")
	}
	.PutLong(.ID)
	.PutLong(.AccessHash)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputEncryptedFile) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputEncryptedFile#5a17b5e5 to nil")
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode inputEncryptedFile#5a17b5e5: field id: %w", )
		}
		.ID = 
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode inputEncryptedFile#5a17b5e5: field access_hash: %w", )
		}
		.AccessHash = 
	}
	return nil
}

// GetID returns value of ID field.
func ( *InputEncryptedFile) () ( int64) {
	if  == nil {
		return
	}
	return .ID
}

// GetAccessHash returns value of AccessHash field.
func ( *InputEncryptedFile) () ( int64) {
	if  == nil {
		return
	}
	return .AccessHash
}

// InputEncryptedFileBigUploaded represents TL type `inputEncryptedFileBigUploaded#2dc173c8`.
// Assigns a new big encrypted file (over 10 MB in size), saved in parts using the method
// upload.saveBigFilePart¹.
//
// Links:
//  1. https://core.telegram.org/method/upload.saveBigFilePart
//
// See https://core.telegram.org/constructor/inputEncryptedFileBigUploaded for reference.
type InputEncryptedFileBigUploaded struct {
	// Random file id, created by the client
	ID int64
	// Number of saved parts
	Parts int
	// 32-bit imprint of the key used to encrypt the file
	KeyFingerprint int
}

// InputEncryptedFileBigUploadedTypeID is TL type id of InputEncryptedFileBigUploaded.
const InputEncryptedFileBigUploadedTypeID = 0x2dc173c8

// construct implements constructor of InputEncryptedFileClass.
func ( InputEncryptedFileBigUploaded) () InputEncryptedFileClass { return & }

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

	_ InputEncryptedFileClass = &InputEncryptedFileBigUploaded{}
)

func ( *InputEncryptedFileBigUploaded) () bool {
	if  == nil {
		return true
	}
	if !(.ID == 0) {
		return false
	}
	if !(.Parts == 0) {
		return false
	}
	if !(.KeyFingerprint == 0) {
		return false
	}

	return true
}

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

// FillFrom fills InputEncryptedFileBigUploaded from given interface.
func ( *InputEncryptedFileBigUploaded) ( interface {
	() ( int64)
	() ( int)
	() ( int)
}) {
	.ID = .()
	.Parts = .()
	.KeyFingerprint = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *InputEncryptedFileBigUploaded) () tdp.Type {
	 := tdp.Type{
		Name: "inputEncryptedFileBigUploaded",
		ID:   InputEncryptedFileBigUploadedTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "ID",
			SchemaName: "id",
		},
		{
			Name:       "Parts",
			SchemaName: "parts",
		},
		{
			Name:       "KeyFingerprint",
			SchemaName: "key_fingerprint",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *InputEncryptedFileBigUploaded) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputEncryptedFileBigUploaded#2dc173c8 as nil")
	}
	.PutID(InputEncryptedFileBigUploadedTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputEncryptedFileBigUploaded) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputEncryptedFileBigUploaded#2dc173c8 as nil")
	}
	.PutLong(.ID)
	.PutInt(.Parts)
	.PutInt(.KeyFingerprint)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputEncryptedFileBigUploaded) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputEncryptedFileBigUploaded#2dc173c8 to nil")
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode inputEncryptedFileBigUploaded#2dc173c8: field id: %w", )
		}
		.ID = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode inputEncryptedFileBigUploaded#2dc173c8: field parts: %w", )
		}
		.Parts = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode inputEncryptedFileBigUploaded#2dc173c8: field key_fingerprint: %w", )
		}
		.KeyFingerprint = 
	}
	return nil
}

// GetID returns value of ID field.
func ( *InputEncryptedFileBigUploaded) () ( int64) {
	if  == nil {
		return
	}
	return .ID
}

// GetParts returns value of Parts field.
func ( *InputEncryptedFileBigUploaded) () ( int) {
	if  == nil {
		return
	}
	return .Parts
}

// GetKeyFingerprint returns value of KeyFingerprint field.
func ( *InputEncryptedFileBigUploaded) () ( int) {
	if  == nil {
		return
	}
	return .KeyFingerprint
}

// InputEncryptedFileClassName is schema name of InputEncryptedFileClass.
const InputEncryptedFileClassName = "InputEncryptedFile"

// InputEncryptedFileClass represents InputEncryptedFile generic type.
//
// See https://core.telegram.org/type/InputEncryptedFile for reference.
//
// Example:
//
//	g, err := tg.DecodeInputEncryptedFile(buf)
//	if err != nil {
//	    panic(err)
//	}
//	switch v := g.(type) {
//	case *tg.InputEncryptedFileEmpty: // inputEncryptedFileEmpty#1837c364
//	case *tg.InputEncryptedFileUploaded: // inputEncryptedFileUploaded#64bd0306
//	case *tg.InputEncryptedFile: // inputEncryptedFile#5a17b5e5
//	case *tg.InputEncryptedFileBigUploaded: // inputEncryptedFileBigUploaded#2dc173c8
//	default: panic(v)
//	}
type InputEncryptedFileClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() InputEncryptedFileClass

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

	// AsNotEmpty tries to map InputEncryptedFileClass to NotEmptyInputEncryptedFile.
	AsNotEmpty() (NotEmptyInputEncryptedFile, bool)
}

// AsInputEncryptedFileLocation tries to map InputEncryptedFile to InputEncryptedFileLocation.
func ( *InputEncryptedFile) () *InputEncryptedFileLocation {
	 := new(InputEncryptedFileLocation)
	.ID = .GetID()
	.AccessHash = .GetAccessHash()

	return 
}

// NotEmptyInputEncryptedFile represents NotEmpty subset of InputEncryptedFileClass.
type NotEmptyInputEncryptedFile interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() InputEncryptedFileClass

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

	// Random file ID created by client
	GetID() (value int64)
}

// AsNotEmpty tries to map InputEncryptedFileEmpty to NotEmptyInputEncryptedFile.
func ( *InputEncryptedFileEmpty) () (NotEmptyInputEncryptedFile, bool) {
	,  := (InputEncryptedFileClass()).(NotEmptyInputEncryptedFile)
	return , 
}

// AsNotEmpty tries to map InputEncryptedFileUploaded to NotEmptyInputEncryptedFile.
func ( *InputEncryptedFileUploaded) () (NotEmptyInputEncryptedFile, bool) {
	,  := (InputEncryptedFileClass()).(NotEmptyInputEncryptedFile)
	return , 
}

// AsNotEmpty tries to map InputEncryptedFile to NotEmptyInputEncryptedFile.
func ( *InputEncryptedFile) () (NotEmptyInputEncryptedFile, bool) {
	,  := (InputEncryptedFileClass()).(NotEmptyInputEncryptedFile)
	return , 
}

// AsNotEmpty tries to map InputEncryptedFileBigUploaded to NotEmptyInputEncryptedFile.
func ( *InputEncryptedFileBigUploaded) () (NotEmptyInputEncryptedFile, bool) {
	,  := (InputEncryptedFileClass()).(NotEmptyInputEncryptedFile)
	return , 
}

// DecodeInputEncryptedFile implements binary de-serialization for InputEncryptedFileClass.
func ( *bin.Buffer) (InputEncryptedFileClass, error) {
	,  := .PeekID()
	if  != nil {
		return nil, 
	}
	switch  {
	case InputEncryptedFileEmptyTypeID:
		// Decoding inputEncryptedFileEmpty#1837c364.
		 := InputEncryptedFileEmpty{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputEncryptedFileClass: %w", )
		}
		return &, nil
	case InputEncryptedFileUploadedTypeID:
		// Decoding inputEncryptedFileUploaded#64bd0306.
		 := InputEncryptedFileUploaded{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputEncryptedFileClass: %w", )
		}
		return &, nil
	case InputEncryptedFileTypeID:
		// Decoding inputEncryptedFile#5a17b5e5.
		 := InputEncryptedFile{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputEncryptedFileClass: %w", )
		}
		return &, nil
	case InputEncryptedFileBigUploadedTypeID:
		// Decoding inputEncryptedFileBigUploaded#2dc173c8.
		 := InputEncryptedFileBigUploaded{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputEncryptedFileClass: %w", )
		}
		return &, nil
	default:
		return nil, fmt.Errorf("unable to decode InputEncryptedFileClass: %w", bin.NewUnexpectedID())
	}
}

// InputEncryptedFile boxes the InputEncryptedFileClass providing a helper.
type InputEncryptedFileBox struct {
	InputEncryptedFile InputEncryptedFileClass
}

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

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