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

// InputWebFileLocation represents TL type `inputWebFileLocation#c239d686`.
// Location of a remote HTTP(s) file
//
// See https://core.telegram.org/constructor/inputWebFileLocation for reference.
type InputWebFileLocation struct {
	// HTTP URL of file
	URL string
	// Access hash
	AccessHash int64
}

// InputWebFileLocationTypeID is TL type id of InputWebFileLocation.
const InputWebFileLocationTypeID = 0xc239d686

// construct implements constructor of InputWebFileLocationClass.
func ( InputWebFileLocation) () InputWebFileLocationClass { return & }

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

	_ InputWebFileLocationClass = &InputWebFileLocation{}
)

func ( *InputWebFileLocation) () bool {
	if  == nil {
		return true
	}
	if !(.URL == "") {
		return false
	}
	if !(.AccessHash == 0) {
		return false
	}

	return true
}

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

// FillFrom fills InputWebFileLocation from given interface.
func ( *InputWebFileLocation) ( interface {
	() ( string)
	() ( int64)
}) {
	.URL = .()
	.AccessHash = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *InputWebFileLocation) () tdp.Type {
	 := tdp.Type{
		Name: "inputWebFileLocation",
		ID:   InputWebFileLocationTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "URL",
			SchemaName: "url",
		},
		{
			Name:       "AccessHash",
			SchemaName: "access_hash",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *InputWebFileLocation) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputWebFileLocation#c239d686 as nil")
	}
	.PutID(InputWebFileLocationTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputWebFileLocation) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputWebFileLocation#c239d686 as nil")
	}
	.PutString(.URL)
	.PutLong(.AccessHash)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputWebFileLocation) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputWebFileLocation#c239d686 to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode inputWebFileLocation#c239d686: field url: %w", )
		}
		.URL = 
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode inputWebFileLocation#c239d686: field access_hash: %w", )
		}
		.AccessHash = 
	}
	return nil
}

// GetURL returns value of URL field.
func ( *InputWebFileLocation) () ( string) {
	if  == nil {
		return
	}
	return .URL
}

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

// InputWebFileGeoPointLocation represents TL type `inputWebFileGeoPointLocation#9f2221c9`.
// Used to download a server-generated image with the map preview from a geoPoint¹, see
// the webfile docs for more info »².
//
// Links:
//  1. https://core.telegram.org/constructor/geoPoint
//  2. https://core.telegram.org/api/files#downloading-webfiles
//
// See https://core.telegram.org/constructor/inputWebFileGeoPointLocation for reference.
type InputWebFileGeoPointLocation struct {
	// Generated from the lat, long and accuracy_radius parameters of the geoPoint¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/geoPoint
	GeoPoint InputGeoPointClass
	// Access hash of the geoPoint¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/geoPoint
	AccessHash int64
	// Map width in pixels before applying scale; 16-1024
	W int
	// Map height in pixels before applying scale; 16-1024
	H int
	// Map zoom level; 13-20
	Zoom int
	// Map scale; 1-3
	Scale int
}

// InputWebFileGeoPointLocationTypeID is TL type id of InputWebFileGeoPointLocation.
const InputWebFileGeoPointLocationTypeID = 0x9f2221c9

// construct implements constructor of InputWebFileLocationClass.
func ( InputWebFileGeoPointLocation) () InputWebFileLocationClass { return & }

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

	_ InputWebFileLocationClass = &InputWebFileGeoPointLocation{}
)

func ( *InputWebFileGeoPointLocation) () bool {
	if  == nil {
		return true
	}
	if !(.GeoPoint == nil) {
		return false
	}
	if !(.AccessHash == 0) {
		return false
	}
	if !(.W == 0) {
		return false
	}
	if !(.H == 0) {
		return false
	}
	if !(.Zoom == 0) {
		return false
	}
	if !(.Scale == 0) {
		return false
	}

	return true
}

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

// FillFrom fills InputWebFileGeoPointLocation from given interface.
func ( *InputWebFileGeoPointLocation) ( interface {
	() ( InputGeoPointClass)
	() ( int64)
	() ( int)
	() ( int)
	() ( int)
	() ( int)
}) {
	.GeoPoint = .()
	.AccessHash = .()
	.W = .()
	.H = .()
	.Zoom = .()
	.Scale = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *InputWebFileGeoPointLocation) () tdp.Type {
	 := tdp.Type{
		Name: "inputWebFileGeoPointLocation",
		ID:   InputWebFileGeoPointLocationTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "GeoPoint",
			SchemaName: "geo_point",
		},
		{
			Name:       "AccessHash",
			SchemaName: "access_hash",
		},
		{
			Name:       "W",
			SchemaName: "w",
		},
		{
			Name:       "H",
			SchemaName: "h",
		},
		{
			Name:       "Zoom",
			SchemaName: "zoom",
		},
		{
			Name:       "Scale",
			SchemaName: "scale",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *InputWebFileGeoPointLocation) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputWebFileGeoPointLocation#9f2221c9 as nil")
	}
	.PutID(InputWebFileGeoPointLocationTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputWebFileGeoPointLocation) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputWebFileGeoPointLocation#9f2221c9 as nil")
	}
	if .GeoPoint == nil {
		return fmt.Errorf("unable to encode inputWebFileGeoPointLocation#9f2221c9: field geo_point is nil")
	}
	if  := .GeoPoint.Encode();  != nil {
		return fmt.Errorf("unable to encode inputWebFileGeoPointLocation#9f2221c9: field geo_point: %w", )
	}
	.PutLong(.AccessHash)
	.PutInt(.W)
	.PutInt(.H)
	.PutInt(.Zoom)
	.PutInt(.Scale)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputWebFileGeoPointLocation) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputWebFileGeoPointLocation#9f2221c9 to nil")
	}
	{
		,  := DecodeInputGeoPoint()
		if  != nil {
			return fmt.Errorf("unable to decode inputWebFileGeoPointLocation#9f2221c9: field geo_point: %w", )
		}
		.GeoPoint = 
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode inputWebFileGeoPointLocation#9f2221c9: field access_hash: %w", )
		}
		.AccessHash = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode inputWebFileGeoPointLocation#9f2221c9: field w: %w", )
		}
		.W = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode inputWebFileGeoPointLocation#9f2221c9: field h: %w", )
		}
		.H = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode inputWebFileGeoPointLocation#9f2221c9: field zoom: %w", )
		}
		.Zoom = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode inputWebFileGeoPointLocation#9f2221c9: field scale: %w", )
		}
		.Scale = 
	}
	return nil
}

// GetGeoPoint returns value of GeoPoint field.
func ( *InputWebFileGeoPointLocation) () ( InputGeoPointClass) {
	if  == nil {
		return
	}
	return .GeoPoint
}

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

// GetW returns value of W field.
func ( *InputWebFileGeoPointLocation) () ( int) {
	if  == nil {
		return
	}
	return .W
}

// GetH returns value of H field.
func ( *InputWebFileGeoPointLocation) () ( int) {
	if  == nil {
		return
	}
	return .H
}

// GetZoom returns value of Zoom field.
func ( *InputWebFileGeoPointLocation) () ( int) {
	if  == nil {
		return
	}
	return .Zoom
}

// GetScale returns value of Scale field.
func ( *InputWebFileGeoPointLocation) () ( int) {
	if  == nil {
		return
	}
	return .Scale
}

// InputWebFileAudioAlbumThumbLocation represents TL type `inputWebFileAudioAlbumThumbLocation#f46fe924`.
// Used to download an album cover for any music file using upload.getWebFile¹, see the
// webfile docs for more info »².
//
// Links:
//  1. https://core.telegram.org/method/upload.getWebFile
//  2. https://core.telegram.org/api/files#downloading-webfiles
//
// See https://core.telegram.org/constructor/inputWebFileAudioAlbumThumbLocation for reference.
type InputWebFileAudioAlbumThumbLocation struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Used to return a thumbnail with 100x100 resolution (instead of the default 600x600)
	Small bool
	// The audio file in question: must NOT be provided in secret chats, provide the title
	// and performer fields instead.
	//
	// Use SetDocument and GetDocument helpers.
	Document InputDocumentClass
	// Song title: should only be used in secret chats, in normal chats provide document
	// instead, as it has more lax rate limits.
	//
	// Use SetTitle and GetTitle helpers.
	Title string
	// Song performer: should only be used in secret chats, in normal chats provide document
	// instead, as it has more lax rate limits.
	//
	// Use SetPerformer and GetPerformer helpers.
	Performer string
}

// InputWebFileAudioAlbumThumbLocationTypeID is TL type id of InputWebFileAudioAlbumThumbLocation.
const InputWebFileAudioAlbumThumbLocationTypeID = 0xf46fe924

// construct implements constructor of InputWebFileLocationClass.
func ( InputWebFileAudioAlbumThumbLocation) () InputWebFileLocationClass { return & }

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

	_ InputWebFileLocationClass = &InputWebFileAudioAlbumThumbLocation{}
)

func ( *InputWebFileAudioAlbumThumbLocation) () bool {
	if  == nil {
		return true
	}
	if !(.Flags.Zero()) {
		return false
	}
	if !(.Small == false) {
		return false
	}
	if !(.Document == nil) {
		return false
	}
	if !(.Title == "") {
		return false
	}
	if !(.Performer == "") {
		return false
	}

	return true
}

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

// FillFrom fills InputWebFileAudioAlbumThumbLocation from given interface.
func ( *InputWebFileAudioAlbumThumbLocation) ( interface {
	() ( bool)
	() ( InputDocumentClass,  bool)
	() ( string,  bool)
	() ( string,  bool)
}) {
	.Small = .()
	if ,  := .();  {
		.Document = 
	}

	if ,  := .();  {
		.Title = 
	}

	if ,  := .();  {
		.Performer = 
	}

}

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

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

// TypeInfo returns info about TL type.
func ( *InputWebFileAudioAlbumThumbLocation) () tdp.Type {
	 := tdp.Type{
		Name: "inputWebFileAudioAlbumThumbLocation",
		ID:   InputWebFileAudioAlbumThumbLocationTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Small",
			SchemaName: "small",
			Null:       !.Flags.Has(2),
		},
		{
			Name:       "Document",
			SchemaName: "document",
			Null:       !.Flags.Has(0),
		},
		{
			Name:       "Title",
			SchemaName: "title",
			Null:       !.Flags.Has(1),
		},
		{
			Name:       "Performer",
			SchemaName: "performer",
			Null:       !.Flags.Has(1),
		},
	}
	return 
}

// SetFlags sets flags for non-zero fields.
func ( *InputWebFileAudioAlbumThumbLocation) () {
	if !(.Small == false) {
		.Flags.Set(2)
	}
	if !(.Document == nil) {
		.Flags.Set(0)
	}
	if !(.Title == "") {
		.Flags.Set(1)
	}
	if !(.Performer == "") {
		.Flags.Set(1)
	}
}

// Encode implements bin.Encoder.
func ( *InputWebFileAudioAlbumThumbLocation) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputWebFileAudioAlbumThumbLocation#f46fe924 as nil")
	}
	.PutID(InputWebFileAudioAlbumThumbLocationTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputWebFileAudioAlbumThumbLocation) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputWebFileAudioAlbumThumbLocation#f46fe924 as nil")
	}
	.SetFlags()
	if  := .Flags.Encode();  != nil {
		return fmt.Errorf("unable to encode inputWebFileAudioAlbumThumbLocation#f46fe924: field flags: %w", )
	}
	if .Flags.Has(0) {
		if .Document == nil {
			return fmt.Errorf("unable to encode inputWebFileAudioAlbumThumbLocation#f46fe924: field document is nil")
		}
		if  := .Document.Encode();  != nil {
			return fmt.Errorf("unable to encode inputWebFileAudioAlbumThumbLocation#f46fe924: field document: %w", )
		}
	}
	if .Flags.Has(1) {
		.PutString(.Title)
	}
	if .Flags.Has(1) {
		.PutString(.Performer)
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputWebFileAudioAlbumThumbLocation) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputWebFileAudioAlbumThumbLocation#f46fe924 to nil")
	}
	{
		if  := .Flags.Decode();  != nil {
			return fmt.Errorf("unable to decode inputWebFileAudioAlbumThumbLocation#f46fe924: field flags: %w", )
		}
	}
	.Small = .Flags.Has(2)
	if .Flags.Has(0) {
		,  := DecodeInputDocument()
		if  != nil {
			return fmt.Errorf("unable to decode inputWebFileAudioAlbumThumbLocation#f46fe924: field document: %w", )
		}
		.Document = 
	}
	if .Flags.Has(1) {
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode inputWebFileAudioAlbumThumbLocation#f46fe924: field title: %w", )
		}
		.Title = 
	}
	if .Flags.Has(1) {
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode inputWebFileAudioAlbumThumbLocation#f46fe924: field performer: %w", )
		}
		.Performer = 
	}
	return nil
}

// SetSmall sets value of Small conditional field.
func ( *InputWebFileAudioAlbumThumbLocation) ( bool) {
	if  {
		.Flags.Set(2)
		.Small = true
	} else {
		.Flags.Unset(2)
		.Small = false
	}
}

// GetSmall returns value of Small conditional field.
func ( *InputWebFileAudioAlbumThumbLocation) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(2)
}

// SetDocument sets value of Document conditional field.
func ( *InputWebFileAudioAlbumThumbLocation) ( InputDocumentClass) {
	.Flags.Set(0)
	.Document = 
}

// GetDocument returns value of Document conditional field and
// boolean which is true if field was set.
func ( *InputWebFileAudioAlbumThumbLocation) () ( InputDocumentClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(0) {
		return , false
	}
	return .Document, true
}

// SetTitle sets value of Title conditional field.
func ( *InputWebFileAudioAlbumThumbLocation) ( string) {
	.Flags.Set(1)
	.Title = 
}

// GetTitle returns value of Title conditional field and
// boolean which is true if field was set.
func ( *InputWebFileAudioAlbumThumbLocation) () ( string,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(1) {
		return , false
	}
	return .Title, true
}

// SetPerformer sets value of Performer conditional field.
func ( *InputWebFileAudioAlbumThumbLocation) ( string) {
	.Flags.Set(1)
	.Performer = 
}

// GetPerformer returns value of Performer conditional field and
// boolean which is true if field was set.
func ( *InputWebFileAudioAlbumThumbLocation) () ( string,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(1) {
		return , false
	}
	return .Performer, true
}

// InputWebFileLocationClassName is schema name of InputWebFileLocationClass.
const InputWebFileLocationClassName = "InputWebFileLocation"

// InputWebFileLocationClass represents InputWebFileLocation generic type.
//
// See https://core.telegram.org/type/InputWebFileLocation for reference.
//
// Example:
//
//	g, err := tg.DecodeInputWebFileLocation(buf)
//	if err != nil {
//	    panic(err)
//	}
//	switch v := g.(type) {
//	case *tg.InputWebFileLocation: // inputWebFileLocation#c239d686
//	case *tg.InputWebFileGeoPointLocation: // inputWebFileGeoPointLocation#9f2221c9
//	case *tg.InputWebFileAudioAlbumThumbLocation: // inputWebFileAudioAlbumThumbLocation#f46fe924
//	default: panic(v)
//	}
type InputWebFileLocationClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() InputWebFileLocationClass

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

// DecodeInputWebFileLocation implements binary de-serialization for InputWebFileLocationClass.
func ( *bin.Buffer) (InputWebFileLocationClass, error) {
	,  := .PeekID()
	if  != nil {
		return nil, 
	}
	switch  {
	case InputWebFileLocationTypeID:
		// Decoding inputWebFileLocation#c239d686.
		 := InputWebFileLocation{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputWebFileLocationClass: %w", )
		}
		return &, nil
	case InputWebFileGeoPointLocationTypeID:
		// Decoding inputWebFileGeoPointLocation#9f2221c9.
		 := InputWebFileGeoPointLocation{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputWebFileLocationClass: %w", )
		}
		return &, nil
	case InputWebFileAudioAlbumThumbLocationTypeID:
		// Decoding inputWebFileAudioAlbumThumbLocation#f46fe924.
		 := InputWebFileAudioAlbumThumbLocation{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputWebFileLocationClass: %w", )
		}
		return &, nil
	default:
		return nil, fmt.Errorf("unable to decode InputWebFileLocationClass: %w", bin.NewUnexpectedID())
	}
}

// InputWebFileLocation boxes the InputWebFileLocationClass providing a helper.
type InputWebFileLocationBox struct {
	InputWebFileLocation InputWebFileLocationClass
}

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

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