func (b *SampleJSONBuilder) RemoveByNames(names ...string) *SampleJSONBuilder {
	for _, name := range names {
		info := b._structPropertyMap[name]
		if info == nil {
			continue
		}
		delete(b._properties, info.fieldName)
	}
	return b
}
RemoveByNames remove properties to SampleJSONBuilder by struct property name. if name is not in the builder, it will ignore.
package g
import (
	"encoding/json"
)
type InnerJSON struct {
	A string `json:"a,omitempty"`
}
type InnerJSONList []*InnerJSON
type InnerPropertyEncoder func(src *Inner, dest *InnerJSON) error
type InnerPropertyDecoder func(src *InnerJSON, dest *Inner) error
type InnerPropertyInfo struct {
	fieldName string
	jsonName  string
	Encoder   InnerPropertyEncoder
	Decoder   InnerPropertyDecoder
}
func (info *InnerPropertyInfo) FieldName() string {
	return info.fieldName
}
func (info *InnerPropertyInfo) JSONName() string {
	return info.jsonName
}
type InnerJSONBuilder struct {
	_properties        map[string]*InnerPropertyInfo
	_jsonPropertyMap   map[string]*InnerPropertyInfo
	_structPropertyMap map[string]*InnerPropertyInfo
	A                  *InnerPropertyInfo
}
func NewInnerJSONBuilder() *InnerJSONBuilder {
	jb := &InnerJSONBuilder{
		_properties:        map[string]*InnerPropertyInfo{},
		_jsonPropertyMap:   map[string]*InnerPropertyInfo{},
		_structPropertyMap: map[string]*InnerPropertyInfo{},
		A: &InnerPropertyInfo{
			fieldName: "A",
			jsonName:  "a",
			Encoder: func(src *Inner, dest *InnerJSON) error {
				if src == nil {
					return nil
				}
				dest.A = src.A
				return nil
			},
			Decoder: func(src *InnerJSON, dest *Inner) error {
				if src == nil {
					return nil
				}
				dest.A = src.A
				return nil
			},
		},
	}
	jb._structPropertyMap["A"] = jb.A
	jb._jsonPropertyMap["a"] = jb.A
	return jb
}
func (b *InnerJSONBuilder) Properties() []*InnerPropertyInfo {
	return []*InnerPropertyInfo{
		b.A,
	}
}
func (b *InnerJSONBuilder) AddAll() *InnerJSONBuilder {
	b._properties["A"] = b.A
	return b
}
func (b *InnerJSONBuilder) Add(infos ...*InnerPropertyInfo) *InnerJSONBuilder {
	for _, info := range infos {
		b._properties[info.fieldName] = info
	}
	return b
}
func (b *InnerJSONBuilder) AddByJSONNames(names ...string) *InnerJSONBuilder {
	for _, name := range names {
		info := b._jsonPropertyMap[name]
		if info == nil {
			continue
		}
		b._properties[info.fieldName] = info
	}
	return b
}
func (b *InnerJSONBuilder) AddByNames(names ...string) *InnerJSONBuilder {
	for _, name := range names {
		info := b._structPropertyMap[name]
		if info == nil {
			continue
		}
		b._properties[info.fieldName] = info
	}
	return b
}
func (b *InnerJSONBuilder) Remove(infos ...*InnerPropertyInfo) *InnerJSONBuilder {
	for _, info := range infos {
		delete(b._properties, info.fieldName)
	}
	return b
}
func (b *InnerJSONBuilder) RemoveByJSONNames(names ...string) *InnerJSONBuilder {
	for _, name := range names {
		info := b._jsonPropertyMap[name]
		if info == nil {
			continue
		}
		delete(b._properties, info.fieldName)
	}
	return b
}
func (b *InnerJSONBuilder) RemoveByNames(names ...string) *InnerJSONBuilder {
	for _, name := range names {
		info := b._structPropertyMap[name]
		if info == nil {
			continue
		}
		delete(b._properties, info.fieldName)
	}
	return b
}
func (b *InnerJSONBuilder) Convert(orig *Inner) (*InnerJSON, error) {
	if orig == nil {
		return nil, nil
	}
	ret := &InnerJSON{}
	for _, info := range b._properties {
		if err := info.Encoder(orig, ret); err != nil {
			return nil, err
		}
	}
	return ret, nil
}
func (b *InnerJSONBuilder) ConvertList(orig []*Inner) (InnerJSONList, error) {
	if orig == nil {
		return nil, nil
	}
	list := make(InnerJSONList, len(orig))
	for idx, or := range orig {
		json, err := b.Convert(or)
		if err != nil {
			return nil, err
		}
		list[idx] = json
	}
	return list, nil
}
func (orig *InnerJSON) Convert() (*Inner, error) {
	ret := &Inner{}
	b := NewInnerJSONBuilder().AddAll()
	for _, info := range b._properties {
		if err := info.Decoder(orig, ret); err != nil {
			return nil, err
		}
	}
	return ret, nil
}
func (jsonList InnerJSONList) Convert() ([]*Inner, error) {
	orig := ([]*InnerJSON)(jsonList)
	list := make([]*Inner, len(orig))
	for idx, or := range orig {
		obj, err := or.Convert()
		if err != nil {
			return nil, err
		}
		list[idx] = obj
	}
	return list, nil
}
func (b *InnerJSONBuilder) Marshal(orig *Inner) ([]byte, error) {
	ret, err := b.Convert(orig)
	if err != nil {
		return nil, err
	}
	return json.Marshal(ret)
}
type SampleJSON struct {
	A1  InnerJSON     `json:"a1,omitempty"`
	A2  *InnerJSON    `json:"a2,omitempty"`
	As1 []InnerJSON   `json:"as1,omitempty"`
	As2 []*InnerJSON  `json:"as2,omitempty"`
	As3 *[]InnerJSON  `json:"as3,omitempty"`
	As4 *[]*InnerJSON `json:"as4,omitempty"`
}
type SampleJSONList []*SampleJSON
type SamplePropertyEncoder func(src *Sample, dest *SampleJSON) error
type SamplePropertyDecoder func(src *SampleJSON, dest *Sample) error
type SamplePropertyInfo struct {
	fieldName string
	jsonName  string
	Encoder   SamplePropertyEncoder
	Decoder   SamplePropertyDecoder
}
func (info *SamplePropertyInfo) FieldName() string {
	return info.fieldName
}
func (info *SamplePropertyInfo) JSONName() string {
	return info.jsonName
}
type SampleJSONBuilder struct {
	_properties        map[string]*SamplePropertyInfo
	_jsonPropertyMap   map[string]*SamplePropertyInfo
	_structPropertyMap map[string]*SamplePropertyInfo
	A1                 *SamplePropertyInfo
	A2                 *SamplePropertyInfo
	As1                *SamplePropertyInfo
	As2                *SamplePropertyInfo
	As3                *SamplePropertyInfo
	As4                *SamplePropertyInfo
}
func NewSampleJSONBuilder() *SampleJSONBuilder {
	jb := &SampleJSONBuilder{
		_properties:        map[string]*SamplePropertyInfo{},
		_jsonPropertyMap:   map[string]*SamplePropertyInfo{},
		_structPropertyMap: map[string]*SamplePropertyInfo{},
		A1: &SamplePropertyInfo{
			fieldName: "A1",
			jsonName:  "a1",
			Encoder: func(src *Sample, dest *SampleJSON) error {
				if src == nil {
					return nil
				}
				d, err := NewInnerJSONBuilder().AddAll().Convert(&src.A1)
				if err != nil {
					return err
				}
				dest.A1 = *d
				return nil
			},
			Decoder: func(src *SampleJSON, dest *Sample) error {
				if src == nil {
					return nil
				}
				d, err := src.A1.Convert()
				if err != nil {
					return err
				}
				dest.A1 = *d
				return nil
			},
		},
		A2: &SamplePropertyInfo{
			fieldName: "A2",
			jsonName:  "a2",
			Encoder: func(src *Sample, dest *SampleJSON) error {
				if src == nil {
					return nil
				} else if src.A2 == nil {
					return nil
				}
				d, err := NewInnerJSONBuilder().AddAll().Convert(src.A2)
				if err != nil {
					return err
				}
				dest.A2 = d
				return nil
			},
			Decoder: func(src *SampleJSON, dest *Sample) error {
				if src == nil {
					return nil
				} else if src.A2 == nil {
					return nil
				}
				d, err := src.A2.Convert()
				if err != nil {
					return err
				}
				dest.A2 = d
				return nil
			},
		},
		As1: &SamplePropertyInfo{
			fieldName: "As1",
			jsonName:  "as1",
			Encoder: func(src *Sample, dest *SampleJSON) error {
				if src == nil {
					return nil
				}
				b := NewInnerJSONBuilder().AddAll()
				list := make([]InnerJSON, len(src.As1))
				for idx, obj := range src.As1 {
					d, err := b.Convert(&obj)
					if err != nil {
						return err
					}
					list[idx] = *d
				}
				dest.As1 = list
				return nil
			},
			Decoder: func(src *SampleJSON, dest *Sample) error {
				if src == nil {
					return nil
				}
				list := make([]Inner, len(src.As1))
				for idx, obj := range src.As1 {
					d, err := obj.Convert()
					if err != nil {
						return err
					}
					list[idx] = *d
				}
				dest.As1 = list
				return nil
			},
		},
		As2: &SamplePropertyInfo{
			fieldName: "As2",
			jsonName:  "as2",
			Encoder: func(src *Sample, dest *SampleJSON) error {
				if src == nil {
					return nil
				}
				list, err := NewInnerJSONBuilder().AddAll().ConvertList(src.As2)
				if err != nil {
					return err
				}
				dest.As2 = ([]*InnerJSON)(list)
				return nil
			},
			Decoder: func(src *SampleJSON, dest *Sample) error {
				if src == nil {
					return nil
				}
				list := make([]*Inner, len(src.As2))
				for idx, obj := range src.As2 {
					if obj == nil {
						continue
					}
					d, err := obj.Convert()
					if err != nil {
						return err
					}
					list[idx] = d
				}
				dest.As2 = list
				return nil
			},
		},
		As3: &SamplePropertyInfo{
			fieldName: "As3",
			jsonName:  "as3",
			Encoder: func(src *Sample, dest *SampleJSON) error {
				if src == nil {
					return nil
				} else if src.As3 == nil {
					return nil
				}
				b := NewInnerJSONBuilder().AddAll()
				list := make([]InnerJSON, len(*src.As3))
				for idx, obj := range *src.As3 {
					d, err := b.Convert(&obj)
					if err != nil {
						return err
					}
					list[idx] = *d
				}
				dest.As3 = &list
				return nil
			},
			Decoder: func(src *SampleJSON, dest *Sample) error {
				if src == nil {
					return nil
				} else if src.As3 == nil {
					return nil
				}
				list := make([]Inner, len(*src.As3))
				for idx, obj := range *src.As3 {
					d, err := obj.Convert()
					if err != nil {
						return err
					}
					list[idx] = *d
				}
				dest.As3 = &list
				return nil
			},
		},
		As4: &SamplePropertyInfo{
			fieldName: "As4",
			jsonName:  "as4",
			Encoder: func(src *Sample, dest *SampleJSON) error {
				if src == nil {
					return nil
				} else if src.As4 == nil {
					return nil
				}
				list, err := NewInnerJSONBuilder().AddAll().ConvertList(*src.As4)
				if err != nil {
					return err
				}
				dest.As4 = (*[]*InnerJSON)(&list)
				return nil
			},
			Decoder: func(src *SampleJSON, dest *Sample) error {
				if src == nil {
					return nil
				} else if src.As4 == nil {
					return nil
				}
				list := make([]*Inner, len(*src.As4))
				for idx, obj := range *src.As4 {
					if obj == nil {
						continue
					}
					d, err := obj.Convert()
					if err != nil {
						return err
					}
					list[idx] = d
				}
				dest.As4 = &list
				return nil
			},
		},
	}
	jb._structPropertyMap["A1"] = jb.A1
	jb._jsonPropertyMap["a1"] = jb.A1
	jb._structPropertyMap["A2"] = jb.A2
	jb._jsonPropertyMap["a2"] = jb.A2
	jb._structPropertyMap["As1"] = jb.As1
	jb._jsonPropertyMap["as1"] = jb.As1
	jb._structPropertyMap["As2"] = jb.As2
	jb._jsonPropertyMap["as2"] = jb.As2
	jb._structPropertyMap["As3"] = jb.As3
	jb._jsonPropertyMap["as3"] = jb.As3
	jb._structPropertyMap["As4"] = jb.As4
	jb._jsonPropertyMap["as4"] = jb.As4
	return jb
}
func (b *SampleJSONBuilder) Properties() []*SamplePropertyInfo {
	return []*SamplePropertyInfo{
		b.A1,
		b.A2,
		b.As1,
		b.As2,
		b.As3,
		b.As4,
	}
}
func (b *SampleJSONBuilder) AddAll() *SampleJSONBuilder {
	b._properties["A1"] = b.A1
	b._properties["A2"] = b.A2
	b._properties["As1"] = b.As1
	b._properties["As2"] = b.As2
	b._properties["As3"] = b.As3
	b._properties["As4"] = b.As4
	return b
}
func (b *SampleJSONBuilder) Add(infos ...*SamplePropertyInfo) *SampleJSONBuilder {
	for _, info := range infos {
		b._properties[info.fieldName] = info
	}
	return b
}
func (b *SampleJSONBuilder) AddByJSONNames(names ...string) *SampleJSONBuilder {
	for _, name := range names {
		info := b._jsonPropertyMap[name]
		if info == nil {
			continue
		}
		b._properties[info.fieldName] = info
	}
	return b
}
func (b *SampleJSONBuilder) AddByNames(names ...string) *SampleJSONBuilder {
	for _, name := range names {
		info := b._structPropertyMap[name]
		if info == nil {
			continue
		}
		b._properties[info.fieldName] = info
	}
	return b
}
func (b *SampleJSONBuilder) Remove(infos ...*SamplePropertyInfo) *SampleJSONBuilder {
	for _, info := range infos {
		delete(b._properties, info.fieldName)
	}
	return b
}
func (b *SampleJSONBuilder) RemoveByJSONNames(names ...string) *SampleJSONBuilder {
	for _, name := range names {
		info := b._jsonPropertyMap[name]
		if info == nil {
			continue
		}
		delete(b._properties, info.fieldName)
	}
	return b
}