func (p *ObjectProxy) GetObject(k string) *ObjectProxy {
	elem := p.Object.Get(k)
	if elem == nil {
		return nil
	}
	switch elem := p.Object.Get(k).(type) {
	case *json.Object:
		return NewObjectProxy(p.context, elem)
	case *ObjectProxy:
		return elem
	default:
		panic("unsupported type")
	}
}
GetObject returns Object of the given key.
package proxy
import (
	gotime "time"
	"github.com/yorkie-team/yorkie/pkg/document/change"
	"github.com/yorkie-team/yorkie/pkg/document/json"
	"github.com/yorkie-team/yorkie/pkg/document/operation"
	"github.com/yorkie-team/yorkie/pkg/document/time"
)
type ObjectProxy struct {
	*json.Object
	context *change.Context
}
func NewObjectProxy(ctx *change.Context, root *json.Object) *ObjectProxy {
	return &ObjectProxy{
		Object:  root,
		context: ctx,
	}
}
func (p *ObjectProxy) SetNewObject(k string) *ObjectProxy {
	v := p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return NewObjectProxy(p.context, json.NewObject(json.NewRHTPriorityQueueMap(), ticket))
	})
	return v.(*ObjectProxy)
}
func (p *ObjectProxy) SetNewArray(k string) *ArrayProxy {
	v := p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return NewArrayProxy(p.context, json.NewArray(json.NewRGATreeList(), ticket))
	})
	return v.(*ArrayProxy)
}
func (p *ObjectProxy) SetNewText(k string) *TextProxy {
	v := p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return NewTextProxy(
			p.context,
			json.NewText(json.NewRGATreeSplit(json.InitialTextNode()), ticket),
		)
	})
	return v.(*TextProxy)
}
func (p *ObjectProxy) SetNewRichText(k string) *RichTextProxy {
	v := p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return NewRichTextProxy(
			p.context,
			json.NewInitialRichText(json.NewRGATreeSplit(json.InitialRichTextNode()), ticket),
		)
	})
	return v.(*RichTextProxy)
}
func (p *ObjectProxy) SetNewCounter(k string, n interface{}) *CounterProxy {
	v := p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return NewCounterProxy(
			p.context,
			json.NewCounter(n, ticket),
		)
	})
	return v.(*CounterProxy)
}
func (p *ObjectProxy) SetNull(k string) *ObjectProxy {
	p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return json.NewPrimitive(nil, ticket)
	})
	return p
}
func (p *ObjectProxy) SetBool(k string, v bool) *ObjectProxy {
	p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return json.NewPrimitive(v, ticket)
	})
	return p
}
func (p *ObjectProxy) SetInteger(k string, v int) *ObjectProxy {
	p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return json.NewPrimitive(v, ticket)
	})
	return p
}
func (p *ObjectProxy) SetLong(k string, v int64) *ObjectProxy {
	p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return json.NewPrimitive(v, ticket)
	})
	return p
}
func (p *ObjectProxy) SetDouble(k string, v float64) *ObjectProxy {
	p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return json.NewPrimitive(v, ticket)
	})
	return p
}
func (p *ObjectProxy) SetString(k, v string) *ObjectProxy {
	p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return json.NewPrimitive(v, ticket)
	})
	return p
}
func (p *ObjectProxy) SetBytes(k string, v []byte) *ObjectProxy {
	p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return json.NewPrimitive(v, ticket)
	})
	return p
}
func (p *ObjectProxy) SetDate(k string, v gotime.Time) *ObjectProxy {
	p.setInternal(k, func(ticket *time.Ticket) json.Element {
		return json.NewPrimitive(v, ticket)
	})
	return p
}
func (p *ObjectProxy) Delete(k string) json.Element {
	if !p.Object.Has(k) {
		return nil
	}
	ticket := p.context.IssueTimeTicket()
	deleted := p.Object.Delete(k, ticket)
	p.context.Push(operation.NewRemove(
		p.CreatedAt(),
		deleted.CreatedAt(),
		ticket,
	))
	p.context.RegisterRemovedElementPair(p, deleted)
	return deleted
}