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

// InputPrivacyKeyStatusTimestamp represents TL type `inputPrivacyKeyStatusTimestamp#4f96cb18`.
// Whether people will be able to see your exact last online timestamp
//
// See https://core.telegram.org/constructor/inputPrivacyKeyStatusTimestamp for reference.
type InputPrivacyKeyStatusTimestamp struct {
}

// InputPrivacyKeyStatusTimestampTypeID is TL type id of InputPrivacyKeyStatusTimestamp.
const InputPrivacyKeyStatusTimestampTypeID = 0x4f96cb18

// construct implements constructor of InputPrivacyKeyClass.
func ( InputPrivacyKeyStatusTimestamp) () InputPrivacyKeyClass { return & }

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

	_ InputPrivacyKeyClass = &InputPrivacyKeyStatusTimestamp{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *InputPrivacyKeyStatusTimestamp) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyStatusTimestamp#4f96cb18 as nil")
	}
	.PutID(InputPrivacyKeyStatusTimestampTypeID)
	return .EncodeBare()
}

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

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

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

// InputPrivacyKeyChatInvite represents TL type `inputPrivacyKeyChatInvite#bdfb0426`.
// Whether people will be able to invite you to chats
//
// See https://core.telegram.org/constructor/inputPrivacyKeyChatInvite for reference.
type InputPrivacyKeyChatInvite struct {
}

// InputPrivacyKeyChatInviteTypeID is TL type id of InputPrivacyKeyChatInvite.
const InputPrivacyKeyChatInviteTypeID = 0xbdfb0426

// construct implements constructor of InputPrivacyKeyClass.
func ( InputPrivacyKeyChatInvite) () InputPrivacyKeyClass { return & }

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

	_ InputPrivacyKeyClass = &InputPrivacyKeyChatInvite{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *InputPrivacyKeyChatInvite) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyChatInvite#bdfb0426 as nil")
	}
	.PutID(InputPrivacyKeyChatInviteTypeID)
	return .EncodeBare()
}

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

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

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

// InputPrivacyKeyPhoneCall represents TL type `inputPrivacyKeyPhoneCall#fabadc5f`.
// Whether you will accept phone calls
//
// See https://core.telegram.org/constructor/inputPrivacyKeyPhoneCall for reference.
type InputPrivacyKeyPhoneCall struct {
}

// InputPrivacyKeyPhoneCallTypeID is TL type id of InputPrivacyKeyPhoneCall.
const InputPrivacyKeyPhoneCallTypeID = 0xfabadc5f

// construct implements constructor of InputPrivacyKeyClass.
func ( InputPrivacyKeyPhoneCall) () InputPrivacyKeyClass { return & }

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

	_ InputPrivacyKeyClass = &InputPrivacyKeyPhoneCall{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *InputPrivacyKeyPhoneCall) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyPhoneCall#fabadc5f as nil")
	}
	.PutID(InputPrivacyKeyPhoneCallTypeID)
	return .EncodeBare()
}

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

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

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

// InputPrivacyKeyPhoneP2P represents TL type `inputPrivacyKeyPhoneP2P#db9e70d2`.
// Whether to allow P2P communication during VoIP calls
//
// See https://core.telegram.org/constructor/inputPrivacyKeyPhoneP2P for reference.
type InputPrivacyKeyPhoneP2P struct {
}

// InputPrivacyKeyPhoneP2PTypeID is TL type id of InputPrivacyKeyPhoneP2P.
const InputPrivacyKeyPhoneP2PTypeID = 0xdb9e70d2

// construct implements constructor of InputPrivacyKeyClass.
func ( InputPrivacyKeyPhoneP2P) () InputPrivacyKeyClass { return & }

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

	_ InputPrivacyKeyClass = &InputPrivacyKeyPhoneP2P{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *InputPrivacyKeyPhoneP2P) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyPhoneP2P#db9e70d2 as nil")
	}
	.PutID(InputPrivacyKeyPhoneP2PTypeID)
	return .EncodeBare()
}

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

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

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

// InputPrivacyKeyForwards represents TL type `inputPrivacyKeyForwards#a4dd4c08`.
// Whether messages forwarded from you will be anonymous¹
//
// Links:
//  1. https://telegram.org/blog/unsend-privacy-emoji#anonymous-forwarding
//
// See https://core.telegram.org/constructor/inputPrivacyKeyForwards for reference.
type InputPrivacyKeyForwards struct {
}

// InputPrivacyKeyForwardsTypeID is TL type id of InputPrivacyKeyForwards.
const InputPrivacyKeyForwardsTypeID = 0xa4dd4c08

// construct implements constructor of InputPrivacyKeyClass.
func ( InputPrivacyKeyForwards) () InputPrivacyKeyClass { return & }

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

	_ InputPrivacyKeyClass = &InputPrivacyKeyForwards{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *InputPrivacyKeyForwards) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyForwards#a4dd4c08 as nil")
	}
	.PutID(InputPrivacyKeyForwardsTypeID)
	return .EncodeBare()
}

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

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

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

// InputPrivacyKeyProfilePhoto represents TL type `inputPrivacyKeyProfilePhoto#5719bacc`.
// Whether people will be able to see your profile picture
//
// See https://core.telegram.org/constructor/inputPrivacyKeyProfilePhoto for reference.
type InputPrivacyKeyProfilePhoto struct {
}

// InputPrivacyKeyProfilePhotoTypeID is TL type id of InputPrivacyKeyProfilePhoto.
const InputPrivacyKeyProfilePhotoTypeID = 0x5719bacc

// construct implements constructor of InputPrivacyKeyClass.
func ( InputPrivacyKeyProfilePhoto) () InputPrivacyKeyClass { return & }

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

	_ InputPrivacyKeyClass = &InputPrivacyKeyProfilePhoto{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *InputPrivacyKeyProfilePhoto) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyProfilePhoto#5719bacc as nil")
	}
	.PutID(InputPrivacyKeyProfilePhotoTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputPrivacyKeyProfilePhoto) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyProfilePhoto#5719bacc as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputPrivacyKeyProfilePhoto) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputPrivacyKeyProfilePhoto#5719bacc to nil")
	}
	return nil
}

// InputPrivacyKeyPhoneNumber represents TL type `inputPrivacyKeyPhoneNumber#352dafa`.
// Whether people will be able to see your phone number
//
// See https://core.telegram.org/constructor/inputPrivacyKeyPhoneNumber for reference.
type InputPrivacyKeyPhoneNumber struct {
}

// InputPrivacyKeyPhoneNumberTypeID is TL type id of InputPrivacyKeyPhoneNumber.
const InputPrivacyKeyPhoneNumberTypeID = 0x352dafa

// construct implements constructor of InputPrivacyKeyClass.
func ( InputPrivacyKeyPhoneNumber) () InputPrivacyKeyClass { return & }

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

	_ InputPrivacyKeyClass = &InputPrivacyKeyPhoneNumber{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *InputPrivacyKeyPhoneNumber) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyPhoneNumber#352dafa as nil")
	}
	.PutID(InputPrivacyKeyPhoneNumberTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputPrivacyKeyPhoneNumber) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyPhoneNumber#352dafa as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputPrivacyKeyPhoneNumber) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputPrivacyKeyPhoneNumber#352dafa to nil")
	}
	return nil
}

// InputPrivacyKeyAddedByPhone represents TL type `inputPrivacyKeyAddedByPhone#d1219bdd`.
// Whether people can add you to their contact list by your phone number
//
// See https://core.telegram.org/constructor/inputPrivacyKeyAddedByPhone for reference.
type InputPrivacyKeyAddedByPhone struct {
}

// InputPrivacyKeyAddedByPhoneTypeID is TL type id of InputPrivacyKeyAddedByPhone.
const InputPrivacyKeyAddedByPhoneTypeID = 0xd1219bdd

// construct implements constructor of InputPrivacyKeyClass.
func ( InputPrivacyKeyAddedByPhone) () InputPrivacyKeyClass { return & }

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

	_ InputPrivacyKeyClass = &InputPrivacyKeyAddedByPhone{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *InputPrivacyKeyAddedByPhone) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyAddedByPhone#d1219bdd as nil")
	}
	.PutID(InputPrivacyKeyAddedByPhoneTypeID)
	return .EncodeBare()
}

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

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

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

// InputPrivacyKeyVoiceMessages represents TL type `inputPrivacyKeyVoiceMessages#aee69d68`.
// Whether people can send you voice messages
//
// See https://core.telegram.org/constructor/inputPrivacyKeyVoiceMessages for reference.
type InputPrivacyKeyVoiceMessages struct {
}

// InputPrivacyKeyVoiceMessagesTypeID is TL type id of InputPrivacyKeyVoiceMessages.
const InputPrivacyKeyVoiceMessagesTypeID = 0xaee69d68

// construct implements constructor of InputPrivacyKeyClass.
func ( InputPrivacyKeyVoiceMessages) () InputPrivacyKeyClass { return & }

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

	_ InputPrivacyKeyClass = &InputPrivacyKeyVoiceMessages{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *InputPrivacyKeyVoiceMessages) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyVoiceMessages#aee69d68 as nil")
	}
	.PutID(InputPrivacyKeyVoiceMessagesTypeID)
	return .EncodeBare()
}

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

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

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

// InputPrivacyKeyAbout represents TL type `inputPrivacyKeyAbout#3823cc40`.
// Whether people can see your bio
//
// See https://core.telegram.org/constructor/inputPrivacyKeyAbout for reference.
type InputPrivacyKeyAbout struct {
}

// InputPrivacyKeyAboutTypeID is TL type id of InputPrivacyKeyAbout.
const InputPrivacyKeyAboutTypeID = 0x3823cc40

// construct implements constructor of InputPrivacyKeyClass.
func ( InputPrivacyKeyAbout) () InputPrivacyKeyClass { return & }

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

	_ InputPrivacyKeyClass = &InputPrivacyKeyAbout{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *InputPrivacyKeyAbout) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyAbout#3823cc40 as nil")
	}
	.PutID(InputPrivacyKeyAboutTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *InputPrivacyKeyAbout) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode inputPrivacyKeyAbout#3823cc40 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *InputPrivacyKeyAbout) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode inputPrivacyKeyAbout#3823cc40 to nil")
	}
	return nil
}

// InputPrivacyKeyClassName is schema name of InputPrivacyKeyClass.
const InputPrivacyKeyClassName = "InputPrivacyKey"

// InputPrivacyKeyClass represents InputPrivacyKey generic type.
//
// See https://core.telegram.org/type/InputPrivacyKey for reference.
//
// Example:
//
//	g, err := tg.DecodeInputPrivacyKey(buf)
//	if err != nil {
//	    panic(err)
//	}
//	switch v := g.(type) {
//	case *tg.InputPrivacyKeyStatusTimestamp: // inputPrivacyKeyStatusTimestamp#4f96cb18
//	case *tg.InputPrivacyKeyChatInvite: // inputPrivacyKeyChatInvite#bdfb0426
//	case *tg.InputPrivacyKeyPhoneCall: // inputPrivacyKeyPhoneCall#fabadc5f
//	case *tg.InputPrivacyKeyPhoneP2P: // inputPrivacyKeyPhoneP2P#db9e70d2
//	case *tg.InputPrivacyKeyForwards: // inputPrivacyKeyForwards#a4dd4c08
//	case *tg.InputPrivacyKeyProfilePhoto: // inputPrivacyKeyProfilePhoto#5719bacc
//	case *tg.InputPrivacyKeyPhoneNumber: // inputPrivacyKeyPhoneNumber#352dafa
//	case *tg.InputPrivacyKeyAddedByPhone: // inputPrivacyKeyAddedByPhone#d1219bdd
//	case *tg.InputPrivacyKeyVoiceMessages: // inputPrivacyKeyVoiceMessages#aee69d68
//	case *tg.InputPrivacyKeyAbout: // inputPrivacyKeyAbout#3823cc40
//	default: panic(v)
//	}
type InputPrivacyKeyClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() InputPrivacyKeyClass

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

// DecodeInputPrivacyKey implements binary de-serialization for InputPrivacyKeyClass.
func ( *bin.Buffer) (InputPrivacyKeyClass, error) {
	,  := .PeekID()
	if  != nil {
		return nil, 
	}
	switch  {
	case InputPrivacyKeyStatusTimestampTypeID:
		// Decoding inputPrivacyKeyStatusTimestamp#4f96cb18.
		 := InputPrivacyKeyStatusTimestamp{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputPrivacyKeyClass: %w", )
		}
		return &, nil
	case InputPrivacyKeyChatInviteTypeID:
		// Decoding inputPrivacyKeyChatInvite#bdfb0426.
		 := InputPrivacyKeyChatInvite{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputPrivacyKeyClass: %w", )
		}
		return &, nil
	case InputPrivacyKeyPhoneCallTypeID:
		// Decoding inputPrivacyKeyPhoneCall#fabadc5f.
		 := InputPrivacyKeyPhoneCall{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputPrivacyKeyClass: %w", )
		}
		return &, nil
	case InputPrivacyKeyPhoneP2PTypeID:
		// Decoding inputPrivacyKeyPhoneP2P#db9e70d2.
		 := InputPrivacyKeyPhoneP2P{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputPrivacyKeyClass: %w", )
		}
		return &, nil
	case InputPrivacyKeyForwardsTypeID:
		// Decoding inputPrivacyKeyForwards#a4dd4c08.
		 := InputPrivacyKeyForwards{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputPrivacyKeyClass: %w", )
		}
		return &, nil
	case InputPrivacyKeyProfilePhotoTypeID:
		// Decoding inputPrivacyKeyProfilePhoto#5719bacc.
		 := InputPrivacyKeyProfilePhoto{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputPrivacyKeyClass: %w", )
		}
		return &, nil
	case InputPrivacyKeyPhoneNumberTypeID:
		// Decoding inputPrivacyKeyPhoneNumber#352dafa.
		 := InputPrivacyKeyPhoneNumber{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputPrivacyKeyClass: %w", )
		}
		return &, nil
	case InputPrivacyKeyAddedByPhoneTypeID:
		// Decoding inputPrivacyKeyAddedByPhone#d1219bdd.
		 := InputPrivacyKeyAddedByPhone{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputPrivacyKeyClass: %w", )
		}
		return &, nil
	case InputPrivacyKeyVoiceMessagesTypeID:
		// Decoding inputPrivacyKeyVoiceMessages#aee69d68.
		 := InputPrivacyKeyVoiceMessages{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputPrivacyKeyClass: %w", )
		}
		return &, nil
	case InputPrivacyKeyAboutTypeID:
		// Decoding inputPrivacyKeyAbout#3823cc40.
		 := InputPrivacyKeyAbout{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode InputPrivacyKeyClass: %w", )
		}
		return &, nil
	default:
		return nil, fmt.Errorf("unable to decode InputPrivacyKeyClass: %w", bin.NewUnexpectedID())
	}
}

// InputPrivacyKey boxes the InputPrivacyKeyClass providing a helper.
type InputPrivacyKeyBox struct {
	InputPrivacyKey InputPrivacyKeyClass
}

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

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