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

// SecureValueErrorData represents TL type `secureValueErrorData#e8a40bd9`.
// Represents an issue in one of the data fields that was provided by the user. The error
// is considered resolved when the field's value changes.
//
// See https://core.telegram.org/constructor/secureValueErrorData for reference.
type SecureValueErrorData struct {
	// The section of the user's Telegram Passport which has the error, one of
	// secureValueTypePersonalDetails¹, secureValueTypePassport²,
	// secureValueTypeDriverLicense³, secureValueTypeIdentityCard⁴,
	// secureValueTypeInternalPassport⁵, secureValueTypeAddress⁶
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypePersonalDetails
	//  2) https://core.telegram.org/constructor/secureValueTypePassport
	//  3) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  4) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	//  5) https://core.telegram.org/constructor/secureValueTypeInternalPassport
	//  6) https://core.telegram.org/constructor/secureValueTypeAddress
	Type SecureValueTypeClass
	// Data hash
	DataHash []byte
	// Name of the data field which has the error
	Field string
	// Error message
	Text string
}

// SecureValueErrorDataTypeID is TL type id of SecureValueErrorData.
const SecureValueErrorDataTypeID = 0xe8a40bd9

// construct implements constructor of SecureValueErrorClass.
func ( SecureValueErrorData) () SecureValueErrorClass { return & }

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

	_ SecureValueErrorClass = &SecureValueErrorData{}
)

func ( *SecureValueErrorData) () bool {
	if  == nil {
		return true
	}
	if !(.Type == nil) {
		return false
	}
	if !(.DataHash == nil) {
		return false
	}
	if !(.Field == "") {
		return false
	}
	if !(.Text == "") {
		return false
	}

	return true
}

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

// FillFrom fills SecureValueErrorData from given interface.
func ( *SecureValueErrorData) ( interface {
	() ( SecureValueTypeClass)
	() ( []byte)
	() ( string)
	() ( string)
}) {
	.Type = .()
	.DataHash = .()
	.Field = .()
	.Text = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *SecureValueErrorData) () tdp.Type {
	 := tdp.Type{
		Name: "secureValueErrorData",
		ID:   SecureValueErrorDataTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Type",
			SchemaName: "type",
		},
		{
			Name:       "DataHash",
			SchemaName: "data_hash",
		},
		{
			Name:       "Field",
			SchemaName: "field",
		},
		{
			Name:       "Text",
			SchemaName: "text",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *SecureValueErrorData) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorData#e8a40bd9 as nil")
	}
	.PutID(SecureValueErrorDataTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *SecureValueErrorData) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorData#e8a40bd9 as nil")
	}
	if .Type == nil {
		return fmt.Errorf("unable to encode secureValueErrorData#e8a40bd9: field type is nil")
	}
	if  := .Type.Encode();  != nil {
		return fmt.Errorf("unable to encode secureValueErrorData#e8a40bd9: field type: %w", )
	}
	.PutBytes(.DataHash)
	.PutString(.Field)
	.PutString(.Text)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *SecureValueErrorData) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode secureValueErrorData#e8a40bd9 to nil")
	}
	{
		,  := DecodeSecureValueType()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorData#e8a40bd9: field type: %w", )
		}
		.Type = 
	}
	{
		,  := .Bytes()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorData#e8a40bd9: field data_hash: %w", )
		}
		.DataHash = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorData#e8a40bd9: field field: %w", )
		}
		.Field = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorData#e8a40bd9: field text: %w", )
		}
		.Text = 
	}
	return nil
}

// GetType returns value of Type field.
func ( *SecureValueErrorData) () ( SecureValueTypeClass) {
	if  == nil {
		return
	}
	return .Type
}

// GetDataHash returns value of DataHash field.
func ( *SecureValueErrorData) () ( []byte) {
	if  == nil {
		return
	}
	return .DataHash
}

// GetField returns value of Field field.
func ( *SecureValueErrorData) () ( string) {
	if  == nil {
		return
	}
	return .Field
}

// GetText returns value of Text field.
func ( *SecureValueErrorData) () ( string) {
	if  == nil {
		return
	}
	return .Text
}

// SecureValueErrorFrontSide represents TL type `secureValueErrorFrontSide#be3dfa`.
// Represents an issue with the front side of a document. The error is considered
// resolved when the file with the front side of the document changes.
//
// See https://core.telegram.org/constructor/secureValueErrorFrontSide for reference.
type SecureValueErrorFrontSide struct {
	// One of secureValueTypePassport¹, secureValueTypeDriverLicense²,
	// secureValueTypeIdentityCard³, secureValueTypeInternalPassport⁴
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypePassport
	//  2) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  3) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	//  4) https://core.telegram.org/constructor/secureValueTypeInternalPassport
	Type SecureValueTypeClass
	// File hash
	FileHash []byte
	// Error message
	Text string
}

// SecureValueErrorFrontSideTypeID is TL type id of SecureValueErrorFrontSide.
const SecureValueErrorFrontSideTypeID = 0xbe3dfa

// construct implements constructor of SecureValueErrorClass.
func ( SecureValueErrorFrontSide) () SecureValueErrorClass { return & }

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

	_ SecureValueErrorClass = &SecureValueErrorFrontSide{}
)

func ( *SecureValueErrorFrontSide) () bool {
	if  == nil {
		return true
	}
	if !(.Type == nil) {
		return false
	}
	if !(.FileHash == nil) {
		return false
	}
	if !(.Text == "") {
		return false
	}

	return true
}

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

// FillFrom fills SecureValueErrorFrontSide from given interface.
func ( *SecureValueErrorFrontSide) ( interface {
	() ( SecureValueTypeClass)
	() ( []byte)
	() ( string)
}) {
	.Type = .()
	.FileHash = .()
	.Text = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *SecureValueErrorFrontSide) () tdp.Type {
	 := tdp.Type{
		Name: "secureValueErrorFrontSide",
		ID:   SecureValueErrorFrontSideTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Type",
			SchemaName: "type",
		},
		{
			Name:       "FileHash",
			SchemaName: "file_hash",
		},
		{
			Name:       "Text",
			SchemaName: "text",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *SecureValueErrorFrontSide) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorFrontSide#be3dfa as nil")
	}
	.PutID(SecureValueErrorFrontSideTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *SecureValueErrorFrontSide) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorFrontSide#be3dfa as nil")
	}
	if .Type == nil {
		return fmt.Errorf("unable to encode secureValueErrorFrontSide#be3dfa: field type is nil")
	}
	if  := .Type.Encode();  != nil {
		return fmt.Errorf("unable to encode secureValueErrorFrontSide#be3dfa: field type: %w", )
	}
	.PutBytes(.FileHash)
	.PutString(.Text)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *SecureValueErrorFrontSide) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode secureValueErrorFrontSide#be3dfa to nil")
	}
	{
		,  := DecodeSecureValueType()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorFrontSide#be3dfa: field type: %w", )
		}
		.Type = 
	}
	{
		,  := .Bytes()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorFrontSide#be3dfa: field file_hash: %w", )
		}
		.FileHash = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorFrontSide#be3dfa: field text: %w", )
		}
		.Text = 
	}
	return nil
}

// GetType returns value of Type field.
func ( *SecureValueErrorFrontSide) () ( SecureValueTypeClass) {
	if  == nil {
		return
	}
	return .Type
}

// GetFileHash returns value of FileHash field.
func ( *SecureValueErrorFrontSide) () ( []byte) {
	if  == nil {
		return
	}
	return .FileHash
}

// GetText returns value of Text field.
func ( *SecureValueErrorFrontSide) () ( string) {
	if  == nil {
		return
	}
	return .Text
}

// SecureValueErrorReverseSide represents TL type `secureValueErrorReverseSide#868a2aa5`.
// Represents an issue with the reverse side of a document. The error is considered
// resolved when the file with reverse side of the document changes.
//
// See https://core.telegram.org/constructor/secureValueErrorReverseSide for reference.
type SecureValueErrorReverseSide struct {
	// One of secureValueTypeDriverLicense¹, secureValueTypeIdentityCard²
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  2) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	Type SecureValueTypeClass
	// File hash
	FileHash []byte
	// Error message
	Text string
}

// SecureValueErrorReverseSideTypeID is TL type id of SecureValueErrorReverseSide.
const SecureValueErrorReverseSideTypeID = 0x868a2aa5

// construct implements constructor of SecureValueErrorClass.
func ( SecureValueErrorReverseSide) () SecureValueErrorClass { return & }

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

	_ SecureValueErrorClass = &SecureValueErrorReverseSide{}
)

func ( *SecureValueErrorReverseSide) () bool {
	if  == nil {
		return true
	}
	if !(.Type == nil) {
		return false
	}
	if !(.FileHash == nil) {
		return false
	}
	if !(.Text == "") {
		return false
	}

	return true
}

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

// FillFrom fills SecureValueErrorReverseSide from given interface.
func ( *SecureValueErrorReverseSide) ( interface {
	() ( SecureValueTypeClass)
	() ( []byte)
	() ( string)
}) {
	.Type = .()
	.FileHash = .()
	.Text = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *SecureValueErrorReverseSide) () tdp.Type {
	 := tdp.Type{
		Name: "secureValueErrorReverseSide",
		ID:   SecureValueErrorReverseSideTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Type",
			SchemaName: "type",
		},
		{
			Name:       "FileHash",
			SchemaName: "file_hash",
		},
		{
			Name:       "Text",
			SchemaName: "text",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *SecureValueErrorReverseSide) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorReverseSide#868a2aa5 as nil")
	}
	.PutID(SecureValueErrorReverseSideTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *SecureValueErrorReverseSide) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorReverseSide#868a2aa5 as nil")
	}
	if .Type == nil {
		return fmt.Errorf("unable to encode secureValueErrorReverseSide#868a2aa5: field type is nil")
	}
	if  := .Type.Encode();  != nil {
		return fmt.Errorf("unable to encode secureValueErrorReverseSide#868a2aa5: field type: %w", )
	}
	.PutBytes(.FileHash)
	.PutString(.Text)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *SecureValueErrorReverseSide) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode secureValueErrorReverseSide#868a2aa5 to nil")
	}
	{
		,  := DecodeSecureValueType()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorReverseSide#868a2aa5: field type: %w", )
		}
		.Type = 
	}
	{
		,  := .Bytes()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorReverseSide#868a2aa5: field file_hash: %w", )
		}
		.FileHash = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorReverseSide#868a2aa5: field text: %w", )
		}
		.Text = 
	}
	return nil
}

// GetType returns value of Type field.
func ( *SecureValueErrorReverseSide) () ( SecureValueTypeClass) {
	if  == nil {
		return
	}
	return .Type
}

// GetFileHash returns value of FileHash field.
func ( *SecureValueErrorReverseSide) () ( []byte) {
	if  == nil {
		return
	}
	return .FileHash
}

// GetText returns value of Text field.
func ( *SecureValueErrorReverseSide) () ( string) {
	if  == nil {
		return
	}
	return .Text
}

// SecureValueErrorSelfie represents TL type `secureValueErrorSelfie#e537ced6`.
// Represents an issue with the selfie with a document. The error is considered resolved
// when the file with the selfie changes.
//
// See https://core.telegram.org/constructor/secureValueErrorSelfie for reference.
type SecureValueErrorSelfie struct {
	// One of secureValueTypePassport¹, secureValueTypeDriverLicense²,
	// secureValueTypeIdentityCard³, secureValueTypeInternalPassport⁴
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypePassport
	//  2) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  3) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	//  4) https://core.telegram.org/constructor/secureValueTypeInternalPassport
	Type SecureValueTypeClass
	// File hash
	FileHash []byte
	// Error message
	Text string
}

// SecureValueErrorSelfieTypeID is TL type id of SecureValueErrorSelfie.
const SecureValueErrorSelfieTypeID = 0xe537ced6

// construct implements constructor of SecureValueErrorClass.
func ( SecureValueErrorSelfie) () SecureValueErrorClass { return & }

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

	_ SecureValueErrorClass = &SecureValueErrorSelfie{}
)

func ( *SecureValueErrorSelfie) () bool {
	if  == nil {
		return true
	}
	if !(.Type == nil) {
		return false
	}
	if !(.FileHash == nil) {
		return false
	}
	if !(.Text == "") {
		return false
	}

	return true
}

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

// FillFrom fills SecureValueErrorSelfie from given interface.
func ( *SecureValueErrorSelfie) ( interface {
	() ( SecureValueTypeClass)
	() ( []byte)
	() ( string)
}) {
	.Type = .()
	.FileHash = .()
	.Text = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *SecureValueErrorSelfie) () tdp.Type {
	 := tdp.Type{
		Name: "secureValueErrorSelfie",
		ID:   SecureValueErrorSelfieTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Type",
			SchemaName: "type",
		},
		{
			Name:       "FileHash",
			SchemaName: "file_hash",
		},
		{
			Name:       "Text",
			SchemaName: "text",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *SecureValueErrorSelfie) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorSelfie#e537ced6 as nil")
	}
	.PutID(SecureValueErrorSelfieTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *SecureValueErrorSelfie) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorSelfie#e537ced6 as nil")
	}
	if .Type == nil {
		return fmt.Errorf("unable to encode secureValueErrorSelfie#e537ced6: field type is nil")
	}
	if  := .Type.Encode();  != nil {
		return fmt.Errorf("unable to encode secureValueErrorSelfie#e537ced6: field type: %w", )
	}
	.PutBytes(.FileHash)
	.PutString(.Text)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *SecureValueErrorSelfie) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode secureValueErrorSelfie#e537ced6 to nil")
	}
	{
		,  := DecodeSecureValueType()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorSelfie#e537ced6: field type: %w", )
		}
		.Type = 
	}
	{
		,  := .Bytes()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorSelfie#e537ced6: field file_hash: %w", )
		}
		.FileHash = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorSelfie#e537ced6: field text: %w", )
		}
		.Text = 
	}
	return nil
}

// GetType returns value of Type field.
func ( *SecureValueErrorSelfie) () ( SecureValueTypeClass) {
	if  == nil {
		return
	}
	return .Type
}

// GetFileHash returns value of FileHash field.
func ( *SecureValueErrorSelfie) () ( []byte) {
	if  == nil {
		return
	}
	return .FileHash
}

// GetText returns value of Text field.
func ( *SecureValueErrorSelfie) () ( string) {
	if  == nil {
		return
	}
	return .Text
}

// SecureValueErrorFile represents TL type `secureValueErrorFile#7a700873`.
// Represents an issue with a document scan. The error is considered resolved when the
// file with the document scan changes.
//
// See https://core.telegram.org/constructor/secureValueErrorFile for reference.
type SecureValueErrorFile struct {
	// One of secureValueTypeUtilityBill¹, secureValueTypeBankStatement²,
	// secureValueTypeRentalAgreement³, secureValueTypePassportRegistration⁴,
	// secureValueTypeTemporaryRegistration⁵
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypeUtilityBill
	//  2) https://core.telegram.org/constructor/secureValueTypeBankStatement
	//  3) https://core.telegram.org/constructor/secureValueTypeRentalAgreement
	//  4) https://core.telegram.org/constructor/secureValueTypePassportRegistration
	//  5) https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration
	Type SecureValueTypeClass
	// File hash
	FileHash []byte
	// Error message
	Text string
}

// SecureValueErrorFileTypeID is TL type id of SecureValueErrorFile.
const SecureValueErrorFileTypeID = 0x7a700873

// construct implements constructor of SecureValueErrorClass.
func ( SecureValueErrorFile) () SecureValueErrorClass { return & }

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

	_ SecureValueErrorClass = &SecureValueErrorFile{}
)

func ( *SecureValueErrorFile) () bool {
	if  == nil {
		return true
	}
	if !(.Type == nil) {
		return false
	}
	if !(.FileHash == nil) {
		return false
	}
	if !(.Text == "") {
		return false
	}

	return true
}

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

// FillFrom fills SecureValueErrorFile from given interface.
func ( *SecureValueErrorFile) ( interface {
	() ( SecureValueTypeClass)
	() ( []byte)
	() ( string)
}) {
	.Type = .()
	.FileHash = .()
	.Text = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *SecureValueErrorFile) () tdp.Type {
	 := tdp.Type{
		Name: "secureValueErrorFile",
		ID:   SecureValueErrorFileTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Type",
			SchemaName: "type",
		},
		{
			Name:       "FileHash",
			SchemaName: "file_hash",
		},
		{
			Name:       "Text",
			SchemaName: "text",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *SecureValueErrorFile) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorFile#7a700873 as nil")
	}
	.PutID(SecureValueErrorFileTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *SecureValueErrorFile) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorFile#7a700873 as nil")
	}
	if .Type == nil {
		return fmt.Errorf("unable to encode secureValueErrorFile#7a700873: field type is nil")
	}
	if  := .Type.Encode();  != nil {
		return fmt.Errorf("unable to encode secureValueErrorFile#7a700873: field type: %w", )
	}
	.PutBytes(.FileHash)
	.PutString(.Text)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *SecureValueErrorFile) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode secureValueErrorFile#7a700873 to nil")
	}
	{
		,  := DecodeSecureValueType()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorFile#7a700873: field type: %w", )
		}
		.Type = 
	}
	{
		,  := .Bytes()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorFile#7a700873: field file_hash: %w", )
		}
		.FileHash = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorFile#7a700873: field text: %w", )
		}
		.Text = 
	}
	return nil
}

// GetType returns value of Type field.
func ( *SecureValueErrorFile) () ( SecureValueTypeClass) {
	if  == nil {
		return
	}
	return .Type
}

// GetFileHash returns value of FileHash field.
func ( *SecureValueErrorFile) () ( []byte) {
	if  == nil {
		return
	}
	return .FileHash
}

// GetText returns value of Text field.
func ( *SecureValueErrorFile) () ( string) {
	if  == nil {
		return
	}
	return .Text
}

// SecureValueErrorFiles represents TL type `secureValueErrorFiles#666220e9`.
// Represents an issue with a list of scans. The error is considered resolved when the
// list of files containing the scans changes.
//
// See https://core.telegram.org/constructor/secureValueErrorFiles for reference.
type SecureValueErrorFiles struct {
	// One of secureValueTypeUtilityBill¹, secureValueTypeBankStatement²,
	// secureValueTypeRentalAgreement³, secureValueTypePassportRegistration⁴,
	// secureValueTypeTemporaryRegistration⁵
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypeUtilityBill
	//  2) https://core.telegram.org/constructor/secureValueTypeBankStatement
	//  3) https://core.telegram.org/constructor/secureValueTypeRentalAgreement
	//  4) https://core.telegram.org/constructor/secureValueTypePassportRegistration
	//  5) https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration
	Type SecureValueTypeClass
	// File hash
	FileHash [][]byte
	// Error message
	Text string
}

// SecureValueErrorFilesTypeID is TL type id of SecureValueErrorFiles.
const SecureValueErrorFilesTypeID = 0x666220e9

// construct implements constructor of SecureValueErrorClass.
func ( SecureValueErrorFiles) () SecureValueErrorClass { return & }

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

	_ SecureValueErrorClass = &SecureValueErrorFiles{}
)

func ( *SecureValueErrorFiles) () bool {
	if  == nil {
		return true
	}
	if !(.Type == nil) {
		return false
	}
	if !(.FileHash == nil) {
		return false
	}
	if !(.Text == "") {
		return false
	}

	return true
}

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

// FillFrom fills SecureValueErrorFiles from given interface.
func ( *SecureValueErrorFiles) ( interface {
	() ( SecureValueTypeClass)
	() ( [][]byte)
	() ( string)
}) {
	.Type = .()
	.FileHash = .()
	.Text = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *SecureValueErrorFiles) () tdp.Type {
	 := tdp.Type{
		Name: "secureValueErrorFiles",
		ID:   SecureValueErrorFilesTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Type",
			SchemaName: "type",
		},
		{
			Name:       "FileHash",
			SchemaName: "file_hash",
		},
		{
			Name:       "Text",
			SchemaName: "text",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *SecureValueErrorFiles) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorFiles#666220e9 as nil")
	}
	.PutID(SecureValueErrorFilesTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *SecureValueErrorFiles) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorFiles#666220e9 as nil")
	}
	if .Type == nil {
		return fmt.Errorf("unable to encode secureValueErrorFiles#666220e9: field type is nil")
	}
	if  := .Type.Encode();  != nil {
		return fmt.Errorf("unable to encode secureValueErrorFiles#666220e9: field type: %w", )
	}
	.PutVectorHeader(len(.FileHash))
	for ,  := range .FileHash {
		.PutBytes()
	}
	.PutString(.Text)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *SecureValueErrorFiles) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode secureValueErrorFiles#666220e9 to nil")
	}
	{
		,  := DecodeSecureValueType()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorFiles#666220e9: field type: %w", )
		}
		.Type = 
	}
	{
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorFiles#666220e9: field file_hash: %w", )
		}

		if  > 0 {
			.FileHash = make([][]byte, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			,  := .Bytes()
			if  != nil {
				return fmt.Errorf("unable to decode secureValueErrorFiles#666220e9: field file_hash: %w", )
			}
			.FileHash = append(.FileHash, )
		}
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorFiles#666220e9: field text: %w", )
		}
		.Text = 
	}
	return nil
}

// GetType returns value of Type field.
func ( *SecureValueErrorFiles) () ( SecureValueTypeClass) {
	if  == nil {
		return
	}
	return .Type
}

// GetFileHash returns value of FileHash field.
func ( *SecureValueErrorFiles) () ( [][]byte) {
	if  == nil {
		return
	}
	return .FileHash
}

// GetText returns value of Text field.
func ( *SecureValueErrorFiles) () ( string) {
	if  == nil {
		return
	}
	return .Text
}

// SecureValueError represents TL type `secureValueError#869d758f`.
// Secure value error
//
// See https://core.telegram.org/constructor/secureValueError for reference.
type SecureValueError struct {
	// Type of element which has the issue
	Type SecureValueTypeClass
	// Hash
	Hash []byte
	// Error message
	Text string
}

// SecureValueErrorTypeID is TL type id of SecureValueError.
const SecureValueErrorTypeID = 0x869d758f

// construct implements constructor of SecureValueErrorClass.
func ( SecureValueError) () SecureValueErrorClass { return & }

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

	_ SecureValueErrorClass = &SecureValueError{}
)

func ( *SecureValueError) () bool {
	if  == nil {
		return true
	}
	if !(.Type == nil) {
		return false
	}
	if !(.Hash == nil) {
		return false
	}
	if !(.Text == "") {
		return false
	}

	return true
}

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

// FillFrom fills SecureValueError from given interface.
func ( *SecureValueError) ( interface {
	() ( SecureValueTypeClass)
	() ( []byte)
	() ( string)
}) {
	.Type = .()
	.Hash = .()
	.Text = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *SecureValueError) () tdp.Type {
	 := tdp.Type{
		Name: "secureValueError",
		ID:   SecureValueErrorTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Type",
			SchemaName: "type",
		},
		{
			Name:       "Hash",
			SchemaName: "hash",
		},
		{
			Name:       "Text",
			SchemaName: "text",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *SecureValueError) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueError#869d758f as nil")
	}
	.PutID(SecureValueErrorTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *SecureValueError) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueError#869d758f as nil")
	}
	if .Type == nil {
		return fmt.Errorf("unable to encode secureValueError#869d758f: field type is nil")
	}
	if  := .Type.Encode();  != nil {
		return fmt.Errorf("unable to encode secureValueError#869d758f: field type: %w", )
	}
	.PutBytes(.Hash)
	.PutString(.Text)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *SecureValueError) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode secureValueError#869d758f to nil")
	}
	{
		,  := DecodeSecureValueType()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueError#869d758f: field type: %w", )
		}
		.Type = 
	}
	{
		,  := .Bytes()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueError#869d758f: field hash: %w", )
		}
		.Hash = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueError#869d758f: field text: %w", )
		}
		.Text = 
	}
	return nil
}

// GetType returns value of Type field.
func ( *SecureValueError) () ( SecureValueTypeClass) {
	if  == nil {
		return
	}
	return .Type
}

// GetHash returns value of Hash field.
func ( *SecureValueError) () ( []byte) {
	if  == nil {
		return
	}
	return .Hash
}

// GetText returns value of Text field.
func ( *SecureValueError) () ( string) {
	if  == nil {
		return
	}
	return .Text
}

// SecureValueErrorTranslationFile represents TL type `secureValueErrorTranslationFile#a1144770`.
// Represents an issue with one of the files that constitute the translation of a
// document. The error is considered resolved when the file changes.
//
// See https://core.telegram.org/constructor/secureValueErrorTranslationFile for reference.
type SecureValueErrorTranslationFile struct {
	// One of secureValueTypePersonalDetails¹, secureValueTypePassport²,
	// secureValueTypeDriverLicense³, secureValueTypeIdentityCard⁴,
	// secureValueTypeInternalPassport⁵, secureValueTypeUtilityBill⁶,
	// secureValueTypeBankStatement⁷, secureValueTypeRentalAgreement⁸,
	// secureValueTypePassportRegistration⁹, secureValueTypeTemporaryRegistration¹⁰
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypePersonalDetails
	//  2) https://core.telegram.org/constructor/secureValueTypePassport
	//  3) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  4) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	//  5) https://core.telegram.org/constructor/secureValueTypeInternalPassport
	//  6) https://core.telegram.org/constructor/secureValueTypeUtilityBill
	//  7) https://core.telegram.org/constructor/secureValueTypeBankStatement
	//  8) https://core.telegram.org/constructor/secureValueTypeRentalAgreement
	//  9) https://core.telegram.org/constructor/secureValueTypePassportRegistration
	//  10) https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration
	Type SecureValueTypeClass
	// File hash
	FileHash []byte
	// Error message
	Text string
}

// SecureValueErrorTranslationFileTypeID is TL type id of SecureValueErrorTranslationFile.
const SecureValueErrorTranslationFileTypeID = 0xa1144770

// construct implements constructor of SecureValueErrorClass.
func ( SecureValueErrorTranslationFile) () SecureValueErrorClass { return & }

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

	_ SecureValueErrorClass = &SecureValueErrorTranslationFile{}
)

func ( *SecureValueErrorTranslationFile) () bool {
	if  == nil {
		return true
	}
	if !(.Type == nil) {
		return false
	}
	if !(.FileHash == nil) {
		return false
	}
	if !(.Text == "") {
		return false
	}

	return true
}

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

// FillFrom fills SecureValueErrorTranslationFile from given interface.
func ( *SecureValueErrorTranslationFile) ( interface {
	() ( SecureValueTypeClass)
	() ( []byte)
	() ( string)
}) {
	.Type = .()
	.FileHash = .()
	.Text = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *SecureValueErrorTranslationFile) () tdp.Type {
	 := tdp.Type{
		Name: "secureValueErrorTranslationFile",
		ID:   SecureValueErrorTranslationFileTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Type",
			SchemaName: "type",
		},
		{
			Name:       "FileHash",
			SchemaName: "file_hash",
		},
		{
			Name:       "Text",
			SchemaName: "text",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *SecureValueErrorTranslationFile) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorTranslationFile#a1144770 as nil")
	}
	.PutID(SecureValueErrorTranslationFileTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *SecureValueErrorTranslationFile) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorTranslationFile#a1144770 as nil")
	}
	if .Type == nil {
		return fmt.Errorf("unable to encode secureValueErrorTranslationFile#a1144770: field type is nil")
	}
	if  := .Type.Encode();  != nil {
		return fmt.Errorf("unable to encode secureValueErrorTranslationFile#a1144770: field type: %w", )
	}
	.PutBytes(.FileHash)
	.PutString(.Text)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *SecureValueErrorTranslationFile) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode secureValueErrorTranslationFile#a1144770 to nil")
	}
	{
		,  := DecodeSecureValueType()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorTranslationFile#a1144770: field type: %w", )
		}
		.Type = 
	}
	{
		,  := .Bytes()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorTranslationFile#a1144770: field file_hash: %w", )
		}
		.FileHash = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorTranslationFile#a1144770: field text: %w", )
		}
		.Text = 
	}
	return nil
}

// GetType returns value of Type field.
func ( *SecureValueErrorTranslationFile) () ( SecureValueTypeClass) {
	if  == nil {
		return
	}
	return .Type
}

// GetFileHash returns value of FileHash field.
func ( *SecureValueErrorTranslationFile) () ( []byte) {
	if  == nil {
		return
	}
	return .FileHash
}

// GetText returns value of Text field.
func ( *SecureValueErrorTranslationFile) () ( string) {
	if  == nil {
		return
	}
	return .Text
}

// SecureValueErrorTranslationFiles represents TL type `secureValueErrorTranslationFiles#34636dd8`.
// Represents an issue with the translated version of a document. The error is considered
// resolved when a file with the document translation changes.
//
// See https://core.telegram.org/constructor/secureValueErrorTranslationFiles for reference.
type SecureValueErrorTranslationFiles struct {
	// One of secureValueTypePersonalDetails¹, secureValueTypePassport²,
	// secureValueTypeDriverLicense³, secureValueTypeIdentityCard⁴,
	// secureValueTypeInternalPassport⁵, secureValueTypeUtilityBill⁶,
	// secureValueTypeBankStatement⁷, secureValueTypeRentalAgreement⁸,
	// secureValueTypePassportRegistration⁹, secureValueTypeTemporaryRegistration¹⁰
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypePersonalDetails
	//  2) https://core.telegram.org/constructor/secureValueTypePassport
	//  3) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  4) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	//  5) https://core.telegram.org/constructor/secureValueTypeInternalPassport
	//  6) https://core.telegram.org/constructor/secureValueTypeUtilityBill
	//  7) https://core.telegram.org/constructor/secureValueTypeBankStatement
	//  8) https://core.telegram.org/constructor/secureValueTypeRentalAgreement
	//  9) https://core.telegram.org/constructor/secureValueTypePassportRegistration
	//  10) https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration
	Type SecureValueTypeClass
	// Hash
	FileHash [][]byte
	// Error message
	Text string
}

// SecureValueErrorTranslationFilesTypeID is TL type id of SecureValueErrorTranslationFiles.
const SecureValueErrorTranslationFilesTypeID = 0x34636dd8

// construct implements constructor of SecureValueErrorClass.
func ( SecureValueErrorTranslationFiles) () SecureValueErrorClass { return & }

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

	_ SecureValueErrorClass = &SecureValueErrorTranslationFiles{}
)

func ( *SecureValueErrorTranslationFiles) () bool {
	if  == nil {
		return true
	}
	if !(.Type == nil) {
		return false
	}
	if !(.FileHash == nil) {
		return false
	}
	if !(.Text == "") {
		return false
	}

	return true
}

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

// FillFrom fills SecureValueErrorTranslationFiles from given interface.
func ( *SecureValueErrorTranslationFiles) ( interface {
	() ( SecureValueTypeClass)
	() ( [][]byte)
	() ( string)
}) {
	.Type = .()
	.FileHash = .()
	.Text = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *SecureValueErrorTranslationFiles) () tdp.Type {
	 := tdp.Type{
		Name: "secureValueErrorTranslationFiles",
		ID:   SecureValueErrorTranslationFilesTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Type",
			SchemaName: "type",
		},
		{
			Name:       "FileHash",
			SchemaName: "file_hash",
		},
		{
			Name:       "Text",
			SchemaName: "text",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *SecureValueErrorTranslationFiles) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorTranslationFiles#34636dd8 as nil")
	}
	.PutID(SecureValueErrorTranslationFilesTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *SecureValueErrorTranslationFiles) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode secureValueErrorTranslationFiles#34636dd8 as nil")
	}
	if .Type == nil {
		return fmt.Errorf("unable to encode secureValueErrorTranslationFiles#34636dd8: field type is nil")
	}
	if  := .Type.Encode();  != nil {
		return fmt.Errorf("unable to encode secureValueErrorTranslationFiles#34636dd8: field type: %w", )
	}
	.PutVectorHeader(len(.FileHash))
	for ,  := range .FileHash {
		.PutBytes()
	}
	.PutString(.Text)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *SecureValueErrorTranslationFiles) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode secureValueErrorTranslationFiles#34636dd8 to nil")
	}
	{
		,  := DecodeSecureValueType()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorTranslationFiles#34636dd8: field type: %w", )
		}
		.Type = 
	}
	{
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorTranslationFiles#34636dd8: field file_hash: %w", )
		}

		if  > 0 {
			.FileHash = make([][]byte, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			,  := .Bytes()
			if  != nil {
				return fmt.Errorf("unable to decode secureValueErrorTranslationFiles#34636dd8: field file_hash: %w", )
			}
			.FileHash = append(.FileHash, )
		}
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode secureValueErrorTranslationFiles#34636dd8: field text: %w", )
		}
		.Text = 
	}
	return nil
}

// GetType returns value of Type field.
func ( *SecureValueErrorTranslationFiles) () ( SecureValueTypeClass) {
	if  == nil {
		return
	}
	return .Type
}

// GetFileHash returns value of FileHash field.
func ( *SecureValueErrorTranslationFiles) () ( [][]byte) {
	if  == nil {
		return
	}
	return .FileHash
}

// GetText returns value of Text field.
func ( *SecureValueErrorTranslationFiles) () ( string) {
	if  == nil {
		return
	}
	return .Text
}

// SecureValueErrorClassName is schema name of SecureValueErrorClass.
const SecureValueErrorClassName = "SecureValueError"

// SecureValueErrorClass represents SecureValueError generic type.
//
// See https://core.telegram.org/type/SecureValueError for reference.
//
// Example:
//
//	g, err := tg.DecodeSecureValueError(buf)
//	if err != nil {
//	    panic(err)
//	}
//	switch v := g.(type) {
//	case *tg.SecureValueErrorData: // secureValueErrorData#e8a40bd9
//	case *tg.SecureValueErrorFrontSide: // secureValueErrorFrontSide#be3dfa
//	case *tg.SecureValueErrorReverseSide: // secureValueErrorReverseSide#868a2aa5
//	case *tg.SecureValueErrorSelfie: // secureValueErrorSelfie#e537ced6
//	case *tg.SecureValueErrorFile: // secureValueErrorFile#7a700873
//	case *tg.SecureValueErrorFiles: // secureValueErrorFiles#666220e9
//	case *tg.SecureValueError: // secureValueError#869d758f
//	case *tg.SecureValueErrorTranslationFile: // secureValueErrorTranslationFile#a1144770
//	case *tg.SecureValueErrorTranslationFiles: // secureValueErrorTranslationFiles#34636dd8
//	default: panic(v)
//	}
type SecureValueErrorClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() SecureValueErrorClass

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

	// The section of the user's Telegram Passport which has the error, one of
	// secureValueTypePersonalDetails¹, secureValueTypePassport²,
	// secureValueTypeDriverLicense³, secureValueTypeIdentityCard⁴,
	// secureValueTypeInternalPassport⁵, secureValueTypeAddress⁶
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypePersonalDetails
	//  2) https://core.telegram.org/constructor/secureValueTypePassport
	//  3) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  4) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	//  5) https://core.telegram.org/constructor/secureValueTypeInternalPassport
	//  6) https://core.telegram.org/constructor/secureValueTypeAddress
	GetType() (value SecureValueTypeClass)

	// Error message
	GetText() (value string)
}

// DecodeSecureValueError implements binary de-serialization for SecureValueErrorClass.
func ( *bin.Buffer) (SecureValueErrorClass, error) {
	,  := .PeekID()
	if  != nil {
		return nil, 
	}
	switch  {
	case SecureValueErrorDataTypeID:
		// Decoding secureValueErrorData#e8a40bd9.
		 := SecureValueErrorData{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode SecureValueErrorClass: %w", )
		}
		return &, nil
	case SecureValueErrorFrontSideTypeID:
		// Decoding secureValueErrorFrontSide#be3dfa.
		 := SecureValueErrorFrontSide{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode SecureValueErrorClass: %w", )
		}
		return &, nil
	case SecureValueErrorReverseSideTypeID:
		// Decoding secureValueErrorReverseSide#868a2aa5.
		 := SecureValueErrorReverseSide{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode SecureValueErrorClass: %w", )
		}
		return &, nil
	case SecureValueErrorSelfieTypeID:
		// Decoding secureValueErrorSelfie#e537ced6.
		 := SecureValueErrorSelfie{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode SecureValueErrorClass: %w", )
		}
		return &, nil
	case SecureValueErrorFileTypeID:
		// Decoding secureValueErrorFile#7a700873.
		 := SecureValueErrorFile{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode SecureValueErrorClass: %w", )
		}
		return &, nil
	case SecureValueErrorFilesTypeID:
		// Decoding secureValueErrorFiles#666220e9.
		 := SecureValueErrorFiles{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode SecureValueErrorClass: %w", )
		}
		return &, nil
	case SecureValueErrorTypeID:
		// Decoding secureValueError#869d758f.
		 := SecureValueError{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode SecureValueErrorClass: %w", )
		}
		return &, nil
	case SecureValueErrorTranslationFileTypeID:
		// Decoding secureValueErrorTranslationFile#a1144770.
		 := SecureValueErrorTranslationFile{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode SecureValueErrorClass: %w", )
		}
		return &, nil
	case SecureValueErrorTranslationFilesTypeID:
		// Decoding secureValueErrorTranslationFiles#34636dd8.
		 := SecureValueErrorTranslationFiles{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode SecureValueErrorClass: %w", )
		}
		return &, nil
	default:
		return nil, fmt.Errorf("unable to decode SecureValueErrorClass: %w", bin.NewUnexpectedID())
	}
}

// SecureValueError boxes the SecureValueErrorClass providing a helper.
type SecureValueErrorBox struct {
	SecureValueError SecureValueErrorClass
}

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

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