forked from TrueCloudLab/frostfs-api-go
[#120] protogen: Omit empty fields from JSON output
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
805da79319
commit
eeb754c327
19 changed files with 4717 additions and 1632 deletions
295
netmap/grpc/service_frostfs.pb.go
generated
295
netmap/grpc/service_frostfs.pb.go
generated
|
@ -257,21 +257,43 @@ func (x *LocalNodeInfoRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|||
out.RawString("null")
|
||||
return
|
||||
}
|
||||
first := true
|
||||
out.RawByte('{')
|
||||
{
|
||||
const prefix string = ",\"body\":"
|
||||
out.RawString(prefix[1:])
|
||||
x.Body.MarshalEasyJSON(out)
|
||||
if x.Body != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"body\":"
|
||||
out.RawString(prefix)
|
||||
x.Body.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"metaHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.MetaHeader.MarshalEasyJSON(out)
|
||||
if x.MetaHeader != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"metaHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.MetaHeader.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"verifyHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.VerifyHeader.MarshalEasyJSON(out)
|
||||
if x.VerifyHeader != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"verifyHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.VerifyHeader.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -437,16 +459,31 @@ func (x *LocalNodeInfoResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|||
out.RawString("null")
|
||||
return
|
||||
}
|
||||
first := true
|
||||
out.RawByte('{')
|
||||
{
|
||||
const prefix string = ",\"version\":"
|
||||
out.RawString(prefix[1:])
|
||||
x.Version.MarshalEasyJSON(out)
|
||||
if x.Version != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"version\":"
|
||||
out.RawString(prefix)
|
||||
x.Version.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"nodeInfo\":"
|
||||
out.RawString(prefix)
|
||||
x.NodeInfo.MarshalEasyJSON(out)
|
||||
if x.NodeInfo != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"nodeInfo\":"
|
||||
out.RawString(prefix)
|
||||
x.NodeInfo.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -646,21 +683,43 @@ func (x *LocalNodeInfoResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|||
out.RawString("null")
|
||||
return
|
||||
}
|
||||
first := true
|
||||
out.RawByte('{')
|
||||
{
|
||||
const prefix string = ",\"body\":"
|
||||
out.RawString(prefix[1:])
|
||||
x.Body.MarshalEasyJSON(out)
|
||||
if x.Body != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"body\":"
|
||||
out.RawString(prefix)
|
||||
x.Body.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"metaHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.MetaHeader.MarshalEasyJSON(out)
|
||||
if x.MetaHeader != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"metaHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.MetaHeader.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"verifyHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.VerifyHeader.MarshalEasyJSON(out)
|
||||
if x.VerifyHeader != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"verifyHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.VerifyHeader.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -962,21 +1021,43 @@ func (x *NetworkInfoRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|||
out.RawString("null")
|
||||
return
|
||||
}
|
||||
first := true
|
||||
out.RawByte('{')
|
||||
{
|
||||
const prefix string = ",\"body\":"
|
||||
out.RawString(prefix[1:])
|
||||
x.Body.MarshalEasyJSON(out)
|
||||
if x.Body != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"body\":"
|
||||
out.RawString(prefix)
|
||||
x.Body.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"metaHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.MetaHeader.MarshalEasyJSON(out)
|
||||
if x.MetaHeader != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"metaHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.MetaHeader.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"verifyHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.VerifyHeader.MarshalEasyJSON(out)
|
||||
if x.VerifyHeader != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"verifyHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.VerifyHeader.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1119,11 +1200,19 @@ func (x *NetworkInfoResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|||
out.RawString("null")
|
||||
return
|
||||
}
|
||||
first := true
|
||||
out.RawByte('{')
|
||||
{
|
||||
const prefix string = ",\"networkInfo\":"
|
||||
out.RawString(prefix[1:])
|
||||
x.NetworkInfo.MarshalEasyJSON(out)
|
||||
if x.NetworkInfo != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"networkInfo\":"
|
||||
out.RawString(prefix)
|
||||
x.NetworkInfo.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1316,21 +1405,43 @@ func (x *NetworkInfoResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|||
out.RawString("null")
|
||||
return
|
||||
}
|
||||
first := true
|
||||
out.RawByte('{')
|
||||
{
|
||||
const prefix string = ",\"body\":"
|
||||
out.RawString(prefix[1:])
|
||||
x.Body.MarshalEasyJSON(out)
|
||||
if x.Body != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"body\":"
|
||||
out.RawString(prefix)
|
||||
x.Body.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"metaHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.MetaHeader.MarshalEasyJSON(out)
|
||||
if x.MetaHeader != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"metaHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.MetaHeader.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"verifyHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.VerifyHeader.MarshalEasyJSON(out)
|
||||
if x.VerifyHeader != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"verifyHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.VerifyHeader.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1632,21 +1743,43 @@ func (x *NetmapSnapshotRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|||
out.RawString("null")
|
||||
return
|
||||
}
|
||||
first := true
|
||||
out.RawByte('{')
|
||||
{
|
||||
const prefix string = ",\"body\":"
|
||||
out.RawString(prefix[1:])
|
||||
x.Body.MarshalEasyJSON(out)
|
||||
if x.Body != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"body\":"
|
||||
out.RawString(prefix)
|
||||
x.Body.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"metaHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.MetaHeader.MarshalEasyJSON(out)
|
||||
if x.MetaHeader != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"metaHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.MetaHeader.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"verifyHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.VerifyHeader.MarshalEasyJSON(out)
|
||||
if x.VerifyHeader != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"verifyHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.VerifyHeader.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1789,11 +1922,19 @@ func (x *NetmapSnapshotResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|||
out.RawString("null")
|
||||
return
|
||||
}
|
||||
first := true
|
||||
out.RawByte('{')
|
||||
{
|
||||
const prefix string = ",\"netmap\":"
|
||||
out.RawString(prefix[1:])
|
||||
x.Netmap.MarshalEasyJSON(out)
|
||||
if x.Netmap != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"netmap\":"
|
||||
out.RawString(prefix)
|
||||
x.Netmap.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1986,21 +2127,43 @@ func (x *NetmapSnapshotResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|||
out.RawString("null")
|
||||
return
|
||||
}
|
||||
first := true
|
||||
out.RawByte('{')
|
||||
{
|
||||
const prefix string = ",\"body\":"
|
||||
out.RawString(prefix[1:])
|
||||
x.Body.MarshalEasyJSON(out)
|
||||
if x.Body != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"body\":"
|
||||
out.RawString(prefix)
|
||||
x.Body.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"metaHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.MetaHeader.MarshalEasyJSON(out)
|
||||
if x.MetaHeader != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"metaHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.MetaHeader.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"verifyHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.VerifyHeader.MarshalEasyJSON(out)
|
||||
if x.VerifyHeader != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
} else {
|
||||
first = false
|
||||
}
|
||||
const prefix string = "\"verifyHeader\":"
|
||||
out.RawString(prefix)
|
||||
x.VerifyHeader.MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue