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