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

// JSONNull represents TL type `jsonNull#3f6d7b68`.
// null JSON value
//
// See https://core.telegram.org/constructor/jsonNull for reference.
type JSONNull struct {
}

// JSONNullTypeID is TL type id of JSONNull.
const JSONNullTypeID = 0x3f6d7b68

// construct implements constructor of JSONValueClass.
func ( JSONNull) () JSONValueClass { return & }

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

	_ JSONValueClass = &JSONNull{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *JSONNull) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode jsonNull#3f6d7b68 as nil")
	}
	.PutID(JSONNullTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *JSONNull) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode jsonNull#3f6d7b68 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *JSONNull) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode jsonNull#3f6d7b68 to nil")
	}
	return nil
}

// JSONBool represents TL type `jsonBool#c7345e6a`.
// JSON boolean value
//
// See https://core.telegram.org/constructor/jsonBool for reference.
type JSONBool struct {
	// Value
	Value bool
}

// JSONBoolTypeID is TL type id of JSONBool.
const JSONBoolTypeID = 0xc7345e6a

// construct implements constructor of JSONValueClass.
func ( JSONBool) () JSONValueClass { return & }

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

	_ JSONValueClass = &JSONBool{}
)

func ( *JSONBool) () bool {
	if  == nil {
		return true
	}
	if !(.Value == false) {
		return false
	}

	return true
}

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

// FillFrom fills JSONBool from given interface.
func ( *JSONBool) ( interface {
	() ( bool)
}) {
	.Value = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *JSONBool) () tdp.Type {
	 := tdp.Type{
		Name: "jsonBool",
		ID:   JSONBoolTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Value",
			SchemaName: "value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *JSONBool) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode jsonBool#c7345e6a as nil")
	}
	.PutID(JSONBoolTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *JSONBool) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode jsonBool#c7345e6a as nil")
	}
	.PutBool(.Value)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *JSONBool) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode jsonBool#c7345e6a to nil")
	}
	{
		,  := .Bool()
		if  != nil {
			return fmt.Errorf("unable to decode jsonBool#c7345e6a: field value: %w", )
		}
		.Value = 
	}
	return nil
}

// GetValue returns value of Value field.
func ( *JSONBool) () ( bool) {
	if  == nil {
		return
	}
	return .Value
}

// JSONNumber represents TL type `jsonNumber#2be0dfa4`.
// JSON numeric value
//
// See https://core.telegram.org/constructor/jsonNumber for reference.
type JSONNumber struct {
	// Value
	Value float64
}

// JSONNumberTypeID is TL type id of JSONNumber.
const JSONNumberTypeID = 0x2be0dfa4

// construct implements constructor of JSONValueClass.
func ( JSONNumber) () JSONValueClass { return & }

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

	_ JSONValueClass = &JSONNumber{}
)

func ( *JSONNumber) () bool {
	if  == nil {
		return true
	}
	if !(.Value == 0) {
		return false
	}

	return true
}

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

// FillFrom fills JSONNumber from given interface.
func ( *JSONNumber) ( interface {
	() ( float64)
}) {
	.Value = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *JSONNumber) () tdp.Type {
	 := tdp.Type{
		Name: "jsonNumber",
		ID:   JSONNumberTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Value",
			SchemaName: "value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *JSONNumber) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode jsonNumber#2be0dfa4 as nil")
	}
	.PutID(JSONNumberTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *JSONNumber) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode jsonNumber#2be0dfa4 as nil")
	}
	.PutDouble(.Value)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *JSONNumber) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode jsonNumber#2be0dfa4 to nil")
	}
	{
		,  := .Double()
		if  != nil {
			return fmt.Errorf("unable to decode jsonNumber#2be0dfa4: field value: %w", )
		}
		.Value = 
	}
	return nil
}

// GetValue returns value of Value field.
func ( *JSONNumber) () ( float64) {
	if  == nil {
		return
	}
	return .Value
}

// JSONString represents TL type `jsonString#b71e767a`.
// JSON string
//
// See https://core.telegram.org/constructor/jsonString for reference.
type JSONString struct {
	// Value
	Value string
}

// JSONStringTypeID is TL type id of JSONString.
const JSONStringTypeID = 0xb71e767a

// construct implements constructor of JSONValueClass.
func ( JSONString) () JSONValueClass { return & }

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

	_ JSONValueClass = &JSONString{}
)

func ( *JSONString) () bool {
	if  == nil {
		return true
	}
	if !(.Value == "") {
		return false
	}

	return true
}

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

// FillFrom fills JSONString from given interface.
func ( *JSONString) ( interface {
	() ( string)
}) {
	.Value = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *JSONString) () tdp.Type {
	 := tdp.Type{
		Name: "jsonString",
		ID:   JSONStringTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Value",
			SchemaName: "value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *JSONString) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode jsonString#b71e767a as nil")
	}
	.PutID(JSONStringTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *JSONString) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode jsonString#b71e767a as nil")
	}
	.PutString(.Value)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *JSONString) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode jsonString#b71e767a to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode jsonString#b71e767a: field value: %w", )
		}
		.Value = 
	}
	return nil
}

// GetValue returns value of Value field.
func ( *JSONString) () ( string) {
	if  == nil {
		return
	}
	return .Value
}

// JSONArray represents TL type `jsonArray#f7444763`.
// JSON array
//
// See https://core.telegram.org/constructor/jsonArray for reference.
type JSONArray struct {
	// JSON values
	Value []JSONValueClass
}

// JSONArrayTypeID is TL type id of JSONArray.
const JSONArrayTypeID = 0xf7444763

// construct implements constructor of JSONValueClass.
func ( JSONArray) () JSONValueClass { return & }

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

	_ JSONValueClass = &JSONArray{}
)

func ( *JSONArray) () bool {
	if  == nil {
		return true
	}
	if !(.Value == nil) {
		return false
	}

	return true
}

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

// FillFrom fills JSONArray from given interface.
func ( *JSONArray) ( interface {
	() ( []JSONValueClass)
}) {
	.Value = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *JSONArray) () tdp.Type {
	 := tdp.Type{
		Name: "jsonArray",
		ID:   JSONArrayTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Value",
			SchemaName: "value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *JSONArray) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode jsonArray#f7444763 as nil")
	}
	.PutID(JSONArrayTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *JSONArray) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode jsonArray#f7444763 as nil")
	}
	.PutVectorHeader(len(.Value))
	for ,  := range .Value {
		if  == nil {
			return fmt.Errorf("unable to encode jsonArray#f7444763: field value element with index %d is nil", )
		}
		if  := .Encode();  != nil {
			return fmt.Errorf("unable to encode jsonArray#f7444763: field value element with index %d: %w", , )
		}
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *JSONArray) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode jsonArray#f7444763 to nil")
	}
	{
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode jsonArray#f7444763: field value: %w", )
		}

		if  > 0 {
			.Value = make([]JSONValueClass, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			,  := DecodeJSONValue()
			if  != nil {
				return fmt.Errorf("unable to decode jsonArray#f7444763: field value: %w", )
			}
			.Value = append(.Value, )
		}
	}
	return nil
}

// GetValue returns value of Value field.
func ( *JSONArray) () ( []JSONValueClass) {
	if  == nil {
		return
	}
	return .Value
}

// MapValue returns field Value wrapped in JSONValueClassArray helper.
func ( *JSONArray) () ( JSONValueClassArray) {
	return JSONValueClassArray(.Value)
}

// JSONObject represents TL type `jsonObject#99c1d49d`.
// JSON object value
//
// See https://core.telegram.org/constructor/jsonObject for reference.
type JSONObject struct {
	// Values
	Value []JSONObjectValue
}

// JSONObjectTypeID is TL type id of JSONObject.
const JSONObjectTypeID = 0x99c1d49d

// construct implements constructor of JSONValueClass.
func ( JSONObject) () JSONValueClass { return & }

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

	_ JSONValueClass = &JSONObject{}
)

func ( *JSONObject) () bool {
	if  == nil {
		return true
	}
	if !(.Value == nil) {
		return false
	}

	return true
}

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

// FillFrom fills JSONObject from given interface.
func ( *JSONObject) ( interface {
	() ( []JSONObjectValue)
}) {
	.Value = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *JSONObject) () tdp.Type {
	 := tdp.Type{
		Name: "jsonObject",
		ID:   JSONObjectTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Value",
			SchemaName: "value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *JSONObject) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode jsonObject#99c1d49d as nil")
	}
	.PutID(JSONObjectTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *JSONObject) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode jsonObject#99c1d49d as nil")
	}
	.PutVectorHeader(len(.Value))
	for ,  := range .Value {
		if  := .Encode();  != nil {
			return fmt.Errorf("unable to encode jsonObject#99c1d49d: field value element with index %d: %w", , )
		}
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *JSONObject) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode jsonObject#99c1d49d to nil")
	}
	{
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode jsonObject#99c1d49d: field value: %w", )
		}

		if  > 0 {
			.Value = make([]JSONObjectValue, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			var  JSONObjectValue
			if  := .Decode();  != nil {
				return fmt.Errorf("unable to decode jsonObject#99c1d49d: field value: %w", )
			}
			.Value = append(.Value, )
		}
	}
	return nil
}

// GetValue returns value of Value field.
func ( *JSONObject) () ( []JSONObjectValue) {
	if  == nil {
		return
	}
	return .Value
}

// JSONValueClassName is schema name of JSONValueClass.
const JSONValueClassName = "JSONValue"

// JSONValueClass represents JSONValue generic type.
//
// See https://core.telegram.org/type/JSONValue for reference.
//
// Example:
//
//	g, err := tg.DecodeJSONValue(buf)
//	if err != nil {
//	    panic(err)
//	}
//	switch v := g.(type) {
//	case *tg.JSONNull: // jsonNull#3f6d7b68
//	case *tg.JSONBool: // jsonBool#c7345e6a
//	case *tg.JSONNumber: // jsonNumber#2be0dfa4
//	case *tg.JSONString: // jsonString#b71e767a
//	case *tg.JSONArray: // jsonArray#f7444763
//	case *tg.JSONObject: // jsonObject#99c1d49d
//	default: panic(v)
//	}
type JSONValueClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() JSONValueClass

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

// DecodeJSONValue implements binary de-serialization for JSONValueClass.
func ( *bin.Buffer) (JSONValueClass, error) {
	,  := .PeekID()
	if  != nil {
		return nil, 
	}
	switch  {
	case JSONNullTypeID:
		// Decoding jsonNull#3f6d7b68.
		 := JSONNull{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode JSONValueClass: %w", )
		}
		return &, nil
	case JSONBoolTypeID:
		// Decoding jsonBool#c7345e6a.
		 := JSONBool{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode JSONValueClass: %w", )
		}
		return &, nil
	case JSONNumberTypeID:
		// Decoding jsonNumber#2be0dfa4.
		 := JSONNumber{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode JSONValueClass: %w", )
		}
		return &, nil
	case JSONStringTypeID:
		// Decoding jsonString#b71e767a.
		 := JSONString{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode JSONValueClass: %w", )
		}
		return &, nil
	case JSONArrayTypeID:
		// Decoding jsonArray#f7444763.
		 := JSONArray{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode JSONValueClass: %w", )
		}
		return &, nil
	case JSONObjectTypeID:
		// Decoding jsonObject#99c1d49d.
		 := JSONObject{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode JSONValueClass: %w", )
		}
		return &, nil
	default:
		return nil, fmt.Errorf("unable to decode JSONValueClass: %w", bin.NewUnexpectedID())
	}
}

// JSONValue boxes the JSONValueClass providing a helper.
type JSONValueBox struct {
	JSONValue JSONValueClass
}

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

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