2020-11-13 15:26:23 +03:00
|
|
|
package object
|
|
|
|
|
|
|
|
import (
|
2021-03-12 15:57:23 +03:00
|
|
|
"github.com/nspcc-dev/neofs-api-go/rpc/message"
|
2020-11-13 15:26:23 +03:00
|
|
|
object "github.com/nspcc-dev/neofs-api-go/v2/object/grpc"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (h *ShortHeader) MarshalJSON() ([]byte, error) {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.MarshalJSON(h)
|
2020-11-13 15:26:23 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *ShortHeader) UnmarshalJSON(data []byte) error {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.UnmarshalJSON(h, data, new(object.ShortHeader))
|
2020-11-13 15:26:23 +03:00
|
|
|
}
|
2020-11-13 15:31:15 +03:00
|
|
|
|
|
|
|
func (a *Attribute) MarshalJSON() ([]byte, error) {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.MarshalJSON(a)
|
2020-11-13 15:31:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Attribute) UnmarshalJSON(data []byte) error {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.UnmarshalJSON(a, data, new(object.Header_Attribute))
|
2020-11-13 15:31:15 +03:00
|
|
|
}
|
2020-11-13 15:34:13 +03:00
|
|
|
|
|
|
|
func (h *SplitHeader) MarshalJSON() ([]byte, error) {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.MarshalJSON(h)
|
2020-11-13 15:34:13 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *SplitHeader) UnmarshalJSON(data []byte) error {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.UnmarshalJSON(h, data, new(object.Header_Split))
|
2020-11-13 15:34:13 +03:00
|
|
|
}
|
2020-11-13 15:38:55 +03:00
|
|
|
|
|
|
|
func (h *Header) MarshalJSON() ([]byte, error) {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.MarshalJSON(h)
|
2020-11-13 15:38:55 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) UnmarshalJSON(data []byte) error {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.UnmarshalJSON(h, data, new(object.Header))
|
2020-11-13 15:38:55 +03:00
|
|
|
}
|
2020-11-13 15:43:02 +03:00
|
|
|
|
|
|
|
func (h *HeaderWithSignature) MarshalJSON() ([]byte, error) {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.MarshalJSON(h)
|
2020-11-13 15:43:02 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *HeaderWithSignature) UnmarshalJSON(data []byte) error {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.UnmarshalJSON(h, data, new(object.HeaderWithSignature))
|
2020-11-13 15:43:02 +03:00
|
|
|
}
|
2020-11-13 15:51:27 +03:00
|
|
|
|
|
|
|
func (o *Object) MarshalJSON() ([]byte, error) {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.MarshalJSON(o)
|
2020-11-13 15:51:27 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (o *Object) UnmarshalJSON(data []byte) error {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.UnmarshalJSON(o, data, new(object.Object))
|
|
|
|
}
|
2020-11-13 15:51:27 +03:00
|
|
|
|
2021-03-12 15:57:23 +03:00
|
|
|
func (s *SplitInfo) MarshalJSON() ([]byte, error) {
|
|
|
|
return message.MarshalJSON(s)
|
|
|
|
}
|
2020-11-13 15:51:27 +03:00
|
|
|
|
2021-03-12 15:57:23 +03:00
|
|
|
func (s *SplitInfo) UnmarshalJSON(data []byte) error {
|
|
|
|
return message.UnmarshalJSON(s, data, new(object.SplitInfo))
|
2020-11-13 15:51:27 +03:00
|
|
|
}
|
2021-02-10 01:31:50 +03:00
|
|
|
|
|
|
|
func (f *SearchFilter) MarshalJSON() ([]byte, error) {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.MarshalJSON(f)
|
2021-02-10 01:31:50 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (f *SearchFilter) UnmarshalJSON(data []byte) error {
|
2021-03-12 15:57:23 +03:00
|
|
|
return message.UnmarshalJSON(f, data, new(object.SearchRequest_Body_Filter))
|
|
|
|
}
|
2021-02-10 01:31:50 +03:00
|
|
|
|
2021-03-12 15:57:23 +03:00
|
|
|
func (r *Range) MarshalJSON() ([]byte, error) {
|
|
|
|
return message.MarshalJSON(r)
|
|
|
|
}
|
2021-02-10 01:31:50 +03:00
|
|
|
|
2021-03-12 15:57:23 +03:00
|
|
|
func (r *Range) UnmarshalJSON(data []byte) error {
|
|
|
|
return message.UnmarshalJSON(r, data, new(object.Range))
|
2021-02-10 01:31:50 +03:00
|
|
|
}
|