[#120] protogen: Omit empty fields from JSON output

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-10-01 09:53:38 +03:00
parent 805da79319
commit eeb754c327
19 changed files with 4717 additions and 1632 deletions

View file

@ -98,12 +98,20 @@ func (x *BalanceRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"ownerId\":" if x.OwnerId != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerId\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out) x.OwnerId.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -295,22 +303,44 @@ func (x *BalanceRequest) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -452,12 +482,20 @@ func (x *BalanceResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"balance\":" if x.Balance != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"balance\":"
out.RawString(prefix)
x.Balance.MarshalEasyJSON(out) x.Balance.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -649,22 +687,44 @@ func (x *BalanceResponse) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -113,17 +113,32 @@ func (x *Decimal) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"value\":" if x.Value != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.Int64(x.Value) out.Int64(x.Value)
} }
}
{ {
const prefix string = ",\"precision\":" if x.Precision != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"precision\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.Precision) out.Uint32(x.Precision)
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -352,10 +352,17 @@ func (x *EACLRecord_Filter) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"headerType\":" if x.HeaderType != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"headerType\":"
out.RawString(prefix)
v := int32(x.HeaderType) v := int32(x.HeaderType)
if vv, ok := HeaderType_name[v]; ok { if vv, ok := HeaderType_name[v]; ok {
out.String(vv) out.String(vv)
@ -363,8 +370,15 @@ func (x *EACLRecord_Filter) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"matchType\":" if x.MatchType != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"matchType\":"
out.RawString(prefix) out.RawString(prefix)
v := int32(x.MatchType) v := int32(x.MatchType)
if vv, ok := MatchType_name[v]; ok { if vv, ok := MatchType_name[v]; ok {
@ -373,16 +387,31 @@ func (x *EACLRecord_Filter) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"key\":" if len(x.Key) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Key) out.String(x.Key)
} }
}
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Value) out.String(x.Value)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -576,10 +605,17 @@ func (x *EACLRecord_Target) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"role\":" if x.Role != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"role\":"
out.RawString(prefix)
v := int32(x.Role) v := int32(x.Role)
if vv, ok := Role_name[v]; ok { if vv, ok := Role_name[v]; ok {
out.String(vv) out.String(vv)
@ -587,8 +623,15 @@ func (x *EACLRecord_Target) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"keys\":" if len(x.Keys) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"keys\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Keys { for i := range x.Keys {
@ -599,6 +642,7 @@ func (x *EACLRecord_Target) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -823,10 +867,17 @@ func (x *EACLRecord) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"operation\":" if x.Operation != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"operation\":"
out.RawString(prefix)
v := int32(x.Operation) v := int32(x.Operation)
if vv, ok := Operation_name[v]; ok { if vv, ok := Operation_name[v]; ok {
out.String(vv) out.String(vv)
@ -834,8 +885,15 @@ func (x *EACLRecord) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"action\":" if x.Action != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"action\":"
out.RawString(prefix) out.RawString(prefix)
v := int32(x.Action) v := int32(x.Action)
if vv, ok := Action_name[v]; ok { if vv, ok := Action_name[v]; ok {
@ -844,8 +902,15 @@ func (x *EACLRecord) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"filters\":" if len(x.Filters) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"filters\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Filters { for i := range x.Filters {
@ -856,8 +921,15 @@ func (x *EACLRecord) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"targets\":" if len(x.Targets) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"targets\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Targets { for i := range x.Targets {
@ -868,6 +940,7 @@ func (x *EACLRecord) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1109,19 +1182,40 @@ func (x *EACLTable) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"version\":" if x.Version != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out) x.Version.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"containerID\":" if x.ContainerId != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerID\":"
out.RawString(prefix) out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out) x.ContainerId.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"records\":" if len(x.Records) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"records\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Records { for i := range x.Records {
@ -1132,6 +1226,7 @@ func (x *EACLTable) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1317,22 +1412,44 @@ func (x *BearerToken_Body_TokenLifetime) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"exp\":" if x.Exp != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"exp\":"
out.RawString(prefix)
out.Uint64(x.Exp) out.Uint64(x.Exp)
} }
}
{ {
const prefix string = ",\"nbf\":" if x.Nbf != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"nbf\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.Nbf) out.Uint64(x.Nbf)
} }
}
{ {
const prefix string = ",\"iat\":" if x.Iat != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"iat\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.Iat) out.Uint64(x.Iat)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1497,14 +1614,28 @@ func (x *BearerToken_Body_APEOverride) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"target\":" if x.Target != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"target\":"
out.RawString(prefix)
x.Target.MarshalEasyJSON(out) x.Target.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"chains\":" if len(x.Chains) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"chains\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Chains { for i := range x.Chains {
@ -1515,6 +1646,7 @@ func (x *BearerToken_Body_APEOverride) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1745,32 +1877,68 @@ func (x *BearerToken_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"eaclTable\":" if x.EaclTable != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"eaclTable\":"
out.RawString(prefix)
x.EaclTable.MarshalEasyJSON(out) x.EaclTable.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"ownerID\":" if x.OwnerId != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerID\":"
out.RawString(prefix) out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out) x.OwnerId.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"lifetime\":" if x.Lifetime != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"lifetime\":"
out.RawString(prefix) out.RawString(prefix)
x.Lifetime.MarshalEasyJSON(out) x.Lifetime.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"allowImpersonate\":" if x.AllowImpersonate {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"allowImpersonate\":"
out.RawString(prefix) out.RawString(prefix)
out.Bool(x.AllowImpersonate) out.Bool(x.AllowImpersonate)
} }
}
{ {
const prefix string = ",\"apeOverride\":" if x.ApeOverride != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"apeOverride\":"
out.RawString(prefix) out.RawString(prefix)
x.ApeOverride.MarshalEasyJSON(out) x.ApeOverride.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1948,17 +2116,32 @@ func (x *BearerToken) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"signature\":" if x.Signature != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix) out.RawString(prefix)
x.Signature.MarshalEasyJSON(out) x.Signature.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -155,10 +155,17 @@ func (x *ChainTarget) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"type\":" if x.Type != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"type\":"
out.RawString(prefix)
v := int32(x.Type) v := int32(x.Type)
if vv, ok := TargetType_name[v]; ok { if vv, ok := TargetType_name[v]; ok {
out.String(vv) out.String(vv)
@ -166,11 +173,19 @@ func (x *ChainTarget) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"name\":" if len(x.Name) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"name\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Name) out.String(x.Name)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -338,15 +353,23 @@ func (x *Chain) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
switch xx := x.Kind.(type) { switch xx := x.Kind.(type) {
case *Chain_Raw: case *Chain_Raw:
{ {
const prefix string = ",\"raw\":" if len(xx.Raw) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"raw\":"
out.RawString(prefix)
out.Base64Bytes(xx.Raw) out.Base64Bytes(xx.Raw)
} }
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -121,17 +121,32 @@ func (x *AddChainRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"target\":" if x.Target != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"target\":"
out.RawString(prefix)
x.Target.MarshalEasyJSON(out) x.Target.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"chain\":" if x.Chain != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"chain\":"
out.RawString(prefix) out.RawString(prefix)
x.Chain.MarshalEasyJSON(out) x.Chain.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -330,22 +345,44 @@ func (x *AddChainRequest) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -484,12 +521,20 @@ func (x *AddChainResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"chainId\":" if len(x.ChainId) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"chainId\":"
out.RawString(prefix)
out.Base64Bytes(x.ChainId) out.Base64Bytes(x.ChainId)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -680,22 +725,44 @@ func (x *AddChainResponse) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -857,17 +924,32 @@ func (x *RemoveChainRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"target\":" if x.Target != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"target\":"
out.RawString(prefix)
x.Target.MarshalEasyJSON(out) x.Target.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"chainId\":" if len(x.ChainId) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"chainId\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.ChainId) out.Base64Bytes(x.ChainId)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1065,22 +1147,44 @@ func (x *RemoveChainRequest) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1381,22 +1485,44 @@ func (x *RemoveChainResponse) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1538,12 +1664,20 @@ func (x *ListChainsRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"target\":" if x.Target != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"target\":"
out.RawString(prefix)
x.Target.MarshalEasyJSON(out) x.Target.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1735,22 +1869,44 @@ func (x *ListChainsRequest) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1895,10 +2051,17 @@ func (x *ListChainsResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"chains\":" if len(x.Chains) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"chains\":"
out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Chains { for i := range x.Chains {
if i != 0 { if i != 0 {
@ -1908,6 +2071,7 @@ func (x *ListChainsResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2106,22 +2270,44 @@ func (x *ListChainsResponse) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -121,17 +121,32 @@ func (x *PutRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"container\":" if x.Container != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"container\":"
out.RawString(prefix)
x.Container.MarshalEasyJSON(out) x.Container.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"signature\":" if x.Signature != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix) out.RawString(prefix)
x.Signature.MarshalEasyJSON(out) x.Signature.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -330,22 +345,44 @@ func (x *PutRequest) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -487,12 +524,20 @@ func (x *PutResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"containerId\":" if x.ContainerId != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerId\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out) x.ContainerId.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -684,22 +729,44 @@ func (x *PutResponse) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -864,17 +931,32 @@ func (x *DeleteRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"containerId\":" if x.ContainerId != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerId\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out) x.ContainerId.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"signature\":" if x.Signature != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix) out.RawString(prefix)
x.Signature.MarshalEasyJSON(out) x.Signature.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1073,22 +1155,44 @@ func (x *DeleteRequest) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1389,22 +1493,44 @@ func (x *DeleteResponse) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1546,12 +1672,20 @@ func (x *GetRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"containerId\":" if x.ContainerId != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerId\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out) x.ContainerId.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1743,22 +1877,44 @@ func (x *GetRequest) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1946,22 +2102,44 @@ func (x *GetResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"container\":" if x.Container != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"container\":"
out.RawString(prefix)
x.Container.MarshalEasyJSON(out) x.Container.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"signature\":" if x.Signature != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix) out.RawString(prefix)
x.Signature.MarshalEasyJSON(out) x.Signature.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"sessionToken\":" if x.SessionToken != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sessionToken\":"
out.RawString(prefix) out.RawString(prefix)
x.SessionToken.MarshalEasyJSON(out) x.SessionToken.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2167,22 +2345,44 @@ func (x *GetResponse) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2324,12 +2524,20 @@ func (x *ListRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"ownerId\":" if x.OwnerId != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerId\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out) x.OwnerId.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2521,22 +2729,44 @@ func (x *ListRequest) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2681,10 +2911,17 @@ func (x *ListResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"containerIds\":" if len(x.ContainerIds) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerIds\":"
out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.ContainerIds { for i := range x.ContainerIds {
if i != 0 { if i != 0 {
@ -2694,6 +2931,7 @@ func (x *ListResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2892,22 +3130,44 @@ func (x *ListResponse) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -115,17 +115,32 @@ func (x *Container_Attribute) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"key\":" if len(x.Key) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.String(x.Key) out.String(x.Key)
} }
}
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Value) out.String(x.Value)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -370,29 +385,64 @@ func (x *Container) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"version\":" if x.Version != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out) x.Version.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"ownerID\":" if x.OwnerId != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerID\":"
out.RawString(prefix) out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out) x.OwnerId.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"nonce\":" if len(x.Nonce) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"nonce\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.Nonce) out.Base64Bytes(x.Nonce)
} }
}
{ {
const prefix string = ",\"basicACL\":" if x.BasicAcl != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"basicACL\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.BasicAcl) out.Uint32(x.BasicAcl)
} }
}
{ {
const prefix string = ",\"attributes\":" if len(x.Attributes) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"attributes\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Attributes { for i := range x.Attributes {
@ -403,11 +453,19 @@ func (x *Container) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"placementPolicy\":" if x.PlacementPolicy != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"placementPolicy\":"
out.RawString(prefix) out.RawString(prefix)
x.PlacementPolicy.MarshalEasyJSON(out) x.PlacementPolicy.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -100,10 +100,17 @@ func (x *Lock) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"members\":" if len(x.Members) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"members\":"
out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Members { for i := range x.Members {
if i != 0 { if i != 0 {
@ -113,6 +120,7 @@ func (x *Lock) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -257,22 +257,44 @@ func (x *LocalNodeInfoRequest) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -437,17 +459,32 @@ func (x *LocalNodeInfoResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"version\":" if x.Version != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out) x.Version.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"nodeInfo\":" if x.NodeInfo != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"nodeInfo\":"
out.RawString(prefix) out.RawString(prefix)
x.NodeInfo.MarshalEasyJSON(out) x.NodeInfo.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -646,22 +683,44 @@ func (x *LocalNodeInfoResponse) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -962,22 +1021,44 @@ func (x *NetworkInfoRequest) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1119,12 +1200,20 @@ func (x *NetworkInfoResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"networkInfo\":" if x.NetworkInfo != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"networkInfo\":"
out.RawString(prefix)
x.NetworkInfo.MarshalEasyJSON(out) x.NetworkInfo.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1316,22 +1405,44 @@ func (x *NetworkInfoResponse) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1632,22 +1743,44 @@ func (x *NetmapSnapshotRequest) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1789,12 +1922,20 @@ func (x *NetmapSnapshotResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"netmap\":" if x.Netmap != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"netmap\":"
out.RawString(prefix)
x.Netmap.MarshalEasyJSON(out) x.Netmap.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1986,22 +2127,44 @@ func (x *NetmapSnapshotResponse) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -274,19 +274,40 @@ func (x *Filter) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"name\":" if len(x.Name) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"name\":"
out.RawString(prefix)
out.String(x.Name) out.String(x.Name)
} }
}
{ {
const prefix string = ",\"key\":" if len(x.Key) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Key) out.String(x.Key)
} }
}
{ {
const prefix string = ",\"op\":" if x.Op != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"op\":"
out.RawString(prefix) out.RawString(prefix)
v := int32(x.Op) v := int32(x.Op)
if vv, ok := Operation_name[v]; ok { if vv, ok := Operation_name[v]; ok {
@ -295,13 +316,27 @@ func (x *Filter) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Value) out.String(x.Value)
} }
}
{ {
const prefix string = ",\"filters\":" if len(x.Filters) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"filters\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Filters { for i := range x.Filters {
@ -312,6 +347,7 @@ func (x *Filter) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -563,19 +599,40 @@ func (x *Selector) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"name\":" if len(x.Name) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"name\":"
out.RawString(prefix)
out.String(x.Name) out.String(x.Name)
} }
}
{ {
const prefix string = ",\"count\":" if x.Count != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"count\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.Count) out.Uint32(x.Count)
} }
}
{ {
const prefix string = ",\"clause\":" if x.Clause != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"clause\":"
out.RawString(prefix) out.RawString(prefix)
v := int32(x.Clause) v := int32(x.Clause)
if vv, ok := Clause_name[v]; ok { if vv, ok := Clause_name[v]; ok {
@ -584,16 +641,31 @@ func (x *Selector) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"attribute\":" if len(x.Attribute) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"attribute\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Attribute) out.String(x.Attribute)
} }
}
{ {
const prefix string = ",\"filter\":" if len(x.Filter) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"filter\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Filter) out.String(x.Filter)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -817,27 +889,56 @@ func (x *Replica) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"count\":" if x.Count != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"count\":"
out.RawString(prefix)
out.Uint32(x.Count) out.Uint32(x.Count)
} }
}
{ {
const prefix string = ",\"selector\":" if len(x.Selector) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"selector\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Selector) out.String(x.Selector)
} }
}
{ {
const prefix string = ",\"ecDataCount\":" if x.EcDataCount != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ecDataCount\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.EcDataCount) out.Uint32(x.EcDataCount)
} }
}
{ {
const prefix string = ",\"ecParityCount\":" if x.EcParityCount != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ecParityCount\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.EcParityCount) out.Uint32(x.EcParityCount)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1077,10 +1178,17 @@ func (x *PlacementPolicy) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"replicas\":" if len(x.Replicas) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"replicas\":"
out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Replicas { for i := range x.Replicas {
if i != 0 { if i != 0 {
@ -1090,13 +1198,27 @@ func (x *PlacementPolicy) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"containerBackupFactor\":" if x.ContainerBackupFactor != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerBackupFactor\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.ContainerBackupFactor) out.Uint32(x.ContainerBackupFactor)
} }
}
{ {
const prefix string = ",\"selectors\":" if len(x.Selectors) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"selectors\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Selectors { for i := range x.Selectors {
@ -1107,8 +1229,15 @@ func (x *PlacementPolicy) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"filters\":" if len(x.Filters) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"filters\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Filters { for i := range x.Filters {
@ -1119,11 +1248,19 @@ func (x *PlacementPolicy) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"unique\":" if x.Unique {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"unique\":"
out.RawString(prefix) out.RawString(prefix)
out.Bool(x.Unique) out.Bool(x.Unique)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1373,19 +1510,40 @@ func (x *NodeInfo_Attribute) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"key\":" if len(x.Key) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.String(x.Key) out.String(x.Key)
} }
}
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Value) out.String(x.Value)
} }
}
{ {
const prefix string = ",\"parents\":" if len(x.Parents) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parents\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Parents { for i := range x.Parents {
@ -1396,6 +1554,7 @@ func (x *NodeInfo_Attribute) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1604,14 +1763,28 @@ func (x *NodeInfo) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"publicKey\":" if len(x.PublicKey) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"publicKey\":"
out.RawString(prefix)
out.Base64Bytes(x.PublicKey) out.Base64Bytes(x.PublicKey)
} }
}
{ {
const prefix string = ",\"addresses\":" if len(x.Addresses) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"addresses\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Addresses { for i := range x.Addresses {
@ -1622,8 +1795,15 @@ func (x *NodeInfo) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"attributes\":" if len(x.Attributes) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"attributes\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Attributes { for i := range x.Attributes {
@ -1634,8 +1814,15 @@ func (x *NodeInfo) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"state\":" if x.State != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"state\":"
out.RawString(prefix) out.RawString(prefix)
v := int32(x.State) v := int32(x.State)
if vv, ok := NodeInfo_State_name[v]; ok { if vv, ok := NodeInfo_State_name[v]; ok {
@ -1644,6 +1831,7 @@ func (x *NodeInfo) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1842,14 +2030,28 @@ func (x *Netmap) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"epoch\":" if x.Epoch != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"epoch\":"
out.RawString(prefix)
out.Uint64(x.Epoch) out.Uint64(x.Epoch)
} }
}
{ {
const prefix string = ",\"nodes\":" if len(x.Nodes) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"nodes\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Nodes { for i := range x.Nodes {
@ -1860,6 +2062,7 @@ func (x *Netmap) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2017,17 +2220,32 @@ func (x *NetworkConfig_Parameter) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"key\":" if len(x.Key) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.Base64Bytes(x.Key) out.Base64Bytes(x.Key)
} }
}
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.Value) out.Base64Bytes(x.Value)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2163,10 +2381,17 @@ func (x *NetworkConfig) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"parameters\":" if len(x.Parameters) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parameters\":"
out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Parameters { for i := range x.Parameters {
if i != 0 { if i != 0 {
@ -2176,6 +2401,7 @@ func (x *NetworkConfig) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2370,27 +2596,56 @@ func (x *NetworkInfo) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"currentEpoch\":" if x.CurrentEpoch != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"currentEpoch\":"
out.RawString(prefix)
out.Uint64(x.CurrentEpoch) out.Uint64(x.CurrentEpoch)
} }
}
{ {
const prefix string = ",\"magicNumber\":" if x.MagicNumber != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"magicNumber\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.MagicNumber) out.Uint64(x.MagicNumber)
} }
}
{ {
const prefix string = ",\"msPerBlock\":" if x.MsPerBlock != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"msPerBlock\":"
out.RawString(prefix) out.RawString(prefix)
out.Int64(x.MsPerBlock) out.Int64(x.MsPerBlock)
} }
}
{ {
const prefix string = ",\"networkConfig\":" if x.NetworkConfig != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"networkConfig\":"
out.RawString(prefix) out.RawString(prefix)
x.NetworkConfig.MarshalEasyJSON(out) x.NetworkConfig.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }

File diff suppressed because it is too large Load diff

View file

@ -304,24 +304,52 @@ func (x *ShortHeader) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"version\":" if x.Version != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out) x.Version.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"creationEpoch\":" if x.CreationEpoch != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"creationEpoch\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.CreationEpoch) out.Uint64(x.CreationEpoch)
} }
}
{ {
const prefix string = ",\"ownerID\":" if x.OwnerId != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerID\":"
out.RawString(prefix) out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out) x.OwnerId.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"objectType\":" if x.ObjectType != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"objectType\":"
out.RawString(prefix) out.RawString(prefix)
v := int32(x.ObjectType) v := int32(x.ObjectType)
if vv, ok := ObjectType_name[v]; ok { if vv, ok := ObjectType_name[v]; ok {
@ -330,21 +358,43 @@ func (x *ShortHeader) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"payloadLength\":" if x.PayloadLength != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"payloadLength\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.PayloadLength) out.Uint64(x.PayloadLength)
} }
}
{ {
const prefix string = ",\"payloadHash\":" if x.PayloadHash != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"payloadHash\":"
out.RawString(prefix) out.RawString(prefix)
x.PayloadHash.MarshalEasyJSON(out) x.PayloadHash.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"homomorphicHash\":" if x.HomomorphicHash != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"homomorphicHash\":"
out.RawString(prefix) out.RawString(prefix)
x.HomomorphicHash.MarshalEasyJSON(out) x.HomomorphicHash.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -544,17 +594,32 @@ func (x *Header_Attribute) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"key\":" if len(x.Key) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.String(x.Key) out.String(x.Key)
} }
}
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Value) out.String(x.Value)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -802,29 +867,64 @@ func (x *Header_Split) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"parent\":" if x.Parent != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parent\":"
out.RawString(prefix)
x.Parent.MarshalEasyJSON(out) x.Parent.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"previous\":" if x.Previous != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"previous\":"
out.RawString(prefix) out.RawString(prefix)
x.Previous.MarshalEasyJSON(out) x.Previous.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"parentSignature\":" if x.ParentSignature != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parentSignature\":"
out.RawString(prefix) out.RawString(prefix)
x.ParentSignature.MarshalEasyJSON(out) x.ParentSignature.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"parentHeader\":" if x.ParentHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parentHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.ParentHeader.MarshalEasyJSON(out) x.ParentHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"children\":" if len(x.Children) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"children\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Children { for i := range x.Children {
@ -835,11 +935,19 @@ func (x *Header_Split) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"splitID\":" if len(x.SplitId) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"splitID\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.SplitId) out.Base64Bytes(x.SplitId)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1157,44 +1265,100 @@ func (x *Header_EC) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"parent\":" if x.Parent != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parent\":"
out.RawString(prefix)
x.Parent.MarshalEasyJSON(out) x.Parent.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"index\":" if x.Index != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"index\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.Index) out.Uint32(x.Index)
} }
}
{ {
const prefix string = ",\"total\":" if x.Total != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"total\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.Total) out.Uint32(x.Total)
} }
}
{ {
const prefix string = ",\"headerLength\":" if x.HeaderLength != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"headerLength\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.HeaderLength) out.Uint32(x.HeaderLength)
} }
}
{ {
const prefix string = ",\"header\":" if len(x.Header) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"header\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.Header) out.Base64Bytes(x.Header)
} }
}
{ {
const prefix string = ",\"parentSplitID\":" if len(x.ParentSplitId) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parentSplitID\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.ParentSplitId) out.Base64Bytes(x.ParentSplitId)
} }
}
{ {
const prefix string = ",\"parentSplitParentID\":" if x.ParentSplitParentId != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parentSplitParentID\":"
out.RawString(prefix) out.RawString(prefix)
x.ParentSplitParentId.MarshalEasyJSON(out) x.ParentSplitParentId.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"parentAttributes\":" if len(x.ParentAttributes) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parentAttributes\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.ParentAttributes { for i := range x.ParentAttributes {
@ -1205,6 +1369,7 @@ func (x *Header_EC) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1630,39 +1795,88 @@ func (x *Header) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"version\":" if x.Version != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out) x.Version.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"containerID\":" if x.ContainerId != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerID\":"
out.RawString(prefix) out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out) x.ContainerId.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"ownerID\":" if x.OwnerId != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerID\":"
out.RawString(prefix) out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out) x.OwnerId.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"creationEpoch\":" if x.CreationEpoch != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"creationEpoch\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.CreationEpoch) out.Uint64(x.CreationEpoch)
} }
}
{ {
const prefix string = ",\"payloadLength\":" if x.PayloadLength != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"payloadLength\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.PayloadLength) out.Uint64(x.PayloadLength)
} }
}
{ {
const prefix string = ",\"payloadHash\":" if x.PayloadHash != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"payloadHash\":"
out.RawString(prefix) out.RawString(prefix)
x.PayloadHash.MarshalEasyJSON(out) x.PayloadHash.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"objectType\":" if x.ObjectType != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"objectType\":"
out.RawString(prefix) out.RawString(prefix)
v := int32(x.ObjectType) v := int32(x.ObjectType)
if vv, ok := ObjectType_name[v]; ok { if vv, ok := ObjectType_name[v]; ok {
@ -1671,18 +1885,39 @@ func (x *Header) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"homomorphicHash\":" if x.HomomorphicHash != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"homomorphicHash\":"
out.RawString(prefix) out.RawString(prefix)
x.HomomorphicHash.MarshalEasyJSON(out) x.HomomorphicHash.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"sessionToken\":" if x.SessionToken != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sessionToken\":"
out.RawString(prefix) out.RawString(prefix)
x.SessionToken.MarshalEasyJSON(out) x.SessionToken.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"attributes\":" if len(x.Attributes) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"attributes\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Attributes { for i := range x.Attributes {
@ -1693,16 +1928,31 @@ func (x *Header) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"split\":" if x.Split != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"split\":"
out.RawString(prefix) out.RawString(prefix)
x.Split.MarshalEasyJSON(out) x.Split.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"ec\":" if x.Ec != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ec\":"
out.RawString(prefix) out.RawString(prefix)
x.Ec.MarshalEasyJSON(out) x.Ec.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1993,27 +2243,56 @@ func (x *Object) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"objectID\":" if x.ObjectId != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"objectID\":"
out.RawString(prefix)
x.ObjectId.MarshalEasyJSON(out) x.ObjectId.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"signature\":" if x.Signature != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix) out.RawString(prefix)
x.Signature.MarshalEasyJSON(out) x.Signature.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"header\":" if x.Header != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"header\":"
out.RawString(prefix) out.RawString(prefix)
x.Header.MarshalEasyJSON(out) x.Header.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"payload\":" if len(x.Payload) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"payload\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.Payload) out.Base64Bytes(x.Payload)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2204,22 +2483,44 @@ func (x *SplitInfo) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"splitId\":" if len(x.SplitId) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"splitId\":"
out.RawString(prefix)
out.Base64Bytes(x.SplitId) out.Base64Bytes(x.SplitId)
} }
}
{ {
const prefix string = ",\"lastPart\":" if x.LastPart != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"lastPart\":"
out.RawString(prefix) out.RawString(prefix)
x.LastPart.MarshalEasyJSON(out) x.LastPart.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"link\":" if x.Link != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"link\":"
out.RawString(prefix) out.RawString(prefix)
x.Link.MarshalEasyJSON(out) x.Link.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2400,22 +2701,44 @@ func (x *ECInfo_Chunk) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"id\":" if x.Id != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"id\":"
out.RawString(prefix)
x.Id.MarshalEasyJSON(out) x.Id.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"index\":" if x.Index != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"index\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.Index) out.Uint32(x.Index)
} }
}
{ {
const prefix string = ",\"total\":" if x.Total != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"total\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.Total) out.Uint32(x.Total)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2558,10 +2881,17 @@ func (x *ECInfo) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"chunks\":" if len(x.Chunks) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"chunks\":"
out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Chunks { for i := range x.Chunks {
if i != 0 { if i != 0 {
@ -2571,6 +2901,7 @@ func (x *ECInfo) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -190,17 +190,32 @@ func (x *Address) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"containerID\":" if x.ContainerId != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerID\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out) x.ContainerId.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"objectID\":" if x.ObjectId != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"objectID\":"
out.RawString(prefix) out.RawString(prefix)
x.ObjectId.MarshalEasyJSON(out) x.ObjectId.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -332,12 +347,20 @@ func (x *ObjectID) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.Base64Bytes(x.Value) out.Base64Bytes(x.Value)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -461,12 +484,20 @@ func (x *ContainerID) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.Base64Bytes(x.Value) out.Base64Bytes(x.Value)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -590,12 +621,20 @@ func (x *OwnerID) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.Base64Bytes(x.Value) out.Base64Bytes(x.Value)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -739,17 +778,32 @@ func (x *Version) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"major\":" if x.Major != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"major\":"
out.RawString(prefix)
out.Uint32(x.Major) out.Uint32(x.Major)
} }
}
{ {
const prefix string = ",\"minor\":" if x.Minor != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"minor\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.Minor) out.Uint32(x.Minor)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -919,19 +973,40 @@ func (x *Signature) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"key\":" if len(x.Key) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.Base64Bytes(x.Key) out.Base64Bytes(x.Key)
} }
}
{ {
const prefix string = ",\"signature\":" if len(x.Sign) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.Sign) out.Base64Bytes(x.Sign)
} }
}
{ {
const prefix string = ",\"scheme\":" if x.Scheme != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"scheme\":"
out.RawString(prefix) out.RawString(prefix)
v := int32(x.Scheme) v := int32(x.Scheme)
if vv, ok := SignatureScheme_name[v]; ok { if vv, ok := SignatureScheme_name[v]; ok {
@ -940,6 +1015,7 @@ func (x *Signature) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1111,17 +1187,32 @@ func (x *SignatureRFC6979) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"key\":" if len(x.Key) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.Base64Bytes(x.Key) out.Base64Bytes(x.Key)
} }
}
{ {
const prefix string = ",\"signature\":" if len(x.Sign) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.Sign) out.Base64Bytes(x.Sign)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1271,10 +1362,17 @@ func (x *Checksum) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"type\":" if x.Type != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"type\":"
out.RawString(prefix)
v := int32(x.Type) v := int32(x.Type)
if vv, ok := ChecksumType_name[v]; ok { if vv, ok := ChecksumType_name[v]; ok {
out.String(vv) out.String(vv)
@ -1282,11 +1380,19 @@ func (x *Checksum) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"sum\":" if len(x.Sum) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sum\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.Sum) out.Base64Bytes(x.Sum)
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -117,17 +117,32 @@ func (x *CreateRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"ownerId\":" if x.OwnerId != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerId\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out) x.OwnerId.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"expiration\":" if x.Expiration != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"expiration\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.Expiration) out.Uint64(x.Expiration)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -325,22 +340,44 @@ func (x *CreateRequest) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -499,17 +536,32 @@ func (x *CreateResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"id\":" if len(x.Id) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"id\":"
out.RawString(prefix)
out.Base64Bytes(x.Id) out.Base64Bytes(x.Id)
} }
}
{ {
const prefix string = ",\"sessionKey\":" if len(x.SessionKey) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sessionKey\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.SessionKey) out.Base64Bytes(x.SessionKey)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -706,22 +758,44 @@ func (x *CreateResponse) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out) x.MetaHeader.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix) out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out) x.VerifyHeader.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -179,14 +179,28 @@ func (x *ObjectSessionContext_Target) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"container\":" if x.Container != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"container\":"
out.RawString(prefix)
x.Container.MarshalEasyJSON(out) x.Container.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"objects\":" if len(x.Objects) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"objects\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Objects { for i := range x.Objects {
@ -197,6 +211,7 @@ func (x *ObjectSessionContext_Target) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -358,10 +373,17 @@ func (x *ObjectSessionContext) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"verb\":" if x.Verb != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verb\":"
out.RawString(prefix)
v := int32(x.Verb) v := int32(x.Verb)
if vv, ok := ObjectSessionContext_Verb_name[v]; ok { if vv, ok := ObjectSessionContext_Verb_name[v]; ok {
out.String(vv) out.String(vv)
@ -369,11 +391,19 @@ func (x *ObjectSessionContext) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"target\":" if x.Target != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"target\":"
out.RawString(prefix) out.RawString(prefix)
x.Target.MarshalEasyJSON(out) x.Target.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -601,10 +631,17 @@ func (x *ContainerSessionContext) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"verb\":" if x.Verb != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verb\":"
out.RawString(prefix)
v := int32(x.Verb) v := int32(x.Verb)
if vv, ok := ContainerSessionContext_Verb_name[v]; ok { if vv, ok := ContainerSessionContext_Verb_name[v]; ok {
out.String(vv) out.String(vv)
@ -612,16 +649,31 @@ func (x *ContainerSessionContext) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
{ {
const prefix string = ",\"wildcard\":" if x.Wildcard {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"wildcard\":"
out.RawString(prefix) out.RawString(prefix)
out.Bool(x.Wildcard) out.Bool(x.Wildcard)
} }
}
{ {
const prefix string = ",\"containerID\":" if x.ContainerId != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerID\":"
out.RawString(prefix) out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out) x.ContainerId.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -814,22 +866,44 @@ func (x *SessionToken_Body_TokenLifetime) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"exp\":" if x.Exp != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"exp\":"
out.RawString(prefix)
out.Uint64(x.Exp) out.Uint64(x.Exp)
} }
}
{ {
const prefix string = ",\"nbf\":" if x.Nbf != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"nbf\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.Nbf) out.Uint64(x.Nbf)
} }
}
{ {
const prefix string = ",\"iat\":" if x.Iat != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"iat\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.Iat) out.Uint64(x.Iat)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1095,41 +1169,84 @@ func (x *SessionToken_Body) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"id\":" if len(x.Id) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"id\":"
out.RawString(prefix)
out.Base64Bytes(x.Id) out.Base64Bytes(x.Id)
} }
}
{ {
const prefix string = ",\"ownerID\":" if x.OwnerId != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerID\":"
out.RawString(prefix) out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out) x.OwnerId.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"lifetime\":" if x.Lifetime != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"lifetime\":"
out.RawString(prefix) out.RawString(prefix)
x.Lifetime.MarshalEasyJSON(out) x.Lifetime.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"sessionKey\":" if len(x.SessionKey) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sessionKey\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.SessionKey) out.Base64Bytes(x.SessionKey)
} }
}
switch xx := x.Context.(type) { switch xx := x.Context.(type) {
case *SessionToken_Body_Object: case *SessionToken_Body_Object:
{ {
const prefix string = ",\"object\":" if xx.Object != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"object\":"
out.RawString(prefix) out.RawString(prefix)
xx.Object.MarshalEasyJSON(out) xx.Object.MarshalEasyJSON(out)
} }
}
case *SessionToken_Body_Container: case *SessionToken_Body_Container:
{ {
const prefix string = ",\"container\":" if xx.Container != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"container\":"
out.RawString(prefix) out.RawString(prefix)
xx.Container.MarshalEasyJSON(out) xx.Container.MarshalEasyJSON(out)
} }
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1333,17 +1450,32 @@ func (x *SessionToken) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"body\":" if x.Body != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out) x.Body.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"signature\":" if x.Signature != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix) out.RawString(prefix)
x.Signature.MarshalEasyJSON(out) x.Signature.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1495,17 +1627,32 @@ func (x *XHeader) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"key\":" if len(x.Key) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.String(x.Key) out.String(x.Key)
} }
}
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Value) out.String(x.Value)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1793,24 +1940,52 @@ func (x *RequestMetaHeader) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"version\":" if x.Version != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out) x.Version.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"epoch\":" if x.Epoch != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"epoch\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.Epoch) out.Uint64(x.Epoch)
} }
}
{ {
const prefix string = ",\"ttl\":" if x.Ttl != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ttl\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.Ttl) out.Uint32(x.Ttl)
} }
}
{ {
const prefix string = ",\"xHeaders\":" if len(x.XHeaders) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"xHeaders\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.XHeaders { for i := range x.XHeaders {
@ -1821,26 +1996,55 @@ func (x *RequestMetaHeader) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"sessionToken\":" if x.SessionToken != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sessionToken\":"
out.RawString(prefix) out.RawString(prefix)
x.SessionToken.MarshalEasyJSON(out) x.SessionToken.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"bearerToken\":" if x.BearerToken != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"bearerToken\":"
out.RawString(prefix) out.RawString(prefix)
x.BearerToken.MarshalEasyJSON(out) x.BearerToken.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"origin\":" if x.Origin != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"origin\":"
out.RawString(prefix) out.RawString(prefix)
x.Origin.MarshalEasyJSON(out) x.Origin.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"magicNumber\":" if x.MagicNumber != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"magicNumber\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.MagicNumber) out.Uint64(x.MagicNumber)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2133,24 +2337,52 @@ func (x *ResponseMetaHeader) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"version\":" if x.Version != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out) x.Version.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"epoch\":" if x.Epoch != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"epoch\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.Epoch) out.Uint64(x.Epoch)
} }
}
{ {
const prefix string = ",\"ttl\":" if x.Ttl != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ttl\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.Ttl) out.Uint32(x.Ttl)
} }
}
{ {
const prefix string = ",\"xHeaders\":" if len(x.XHeaders) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"xHeaders\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.XHeaders { for i := range x.XHeaders {
@ -2161,16 +2393,31 @@ func (x *ResponseMetaHeader) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"origin\":" if x.Origin != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"origin\":"
out.RawString(prefix) out.RawString(prefix)
x.Origin.MarshalEasyJSON(out) x.Origin.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"status\":" if x.Status != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"status\":"
out.RawString(prefix) out.RawString(prefix)
x.Status.MarshalEasyJSON(out) x.Status.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2407,27 +2654,56 @@ func (x *RequestVerificationHeader) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"bodySignature\":" if x.BodySignature != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"bodySignature\":"
out.RawString(prefix)
x.BodySignature.MarshalEasyJSON(out) x.BodySignature.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaSignature\":" if x.MetaSignature != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaSignature\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaSignature.MarshalEasyJSON(out) x.MetaSignature.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"originSignature\":" if x.OriginSignature != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"originSignature\":"
out.RawString(prefix) out.RawString(prefix)
x.OriginSignature.MarshalEasyJSON(out) x.OriginSignature.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"origin\":" if x.Origin != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"origin\":"
out.RawString(prefix) out.RawString(prefix)
x.Origin.MarshalEasyJSON(out) x.Origin.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2645,27 +2921,56 @@ func (x *ResponseVerificationHeader) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"bodySignature\":" if x.BodySignature != nil {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"bodySignature\":"
out.RawString(prefix)
x.BodySignature.MarshalEasyJSON(out) x.BodySignature.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"metaSignature\":" if x.MetaSignature != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaSignature\":"
out.RawString(prefix) out.RawString(prefix)
x.MetaSignature.MarshalEasyJSON(out) x.MetaSignature.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"originSignature\":" if x.OriginSignature != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"originSignature\":"
out.RawString(prefix) out.RawString(prefix)
x.OriginSignature.MarshalEasyJSON(out) x.OriginSignature.MarshalEasyJSON(out)
} }
}
{ {
const prefix string = ",\"origin\":" if x.Origin != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"origin\":"
out.RawString(prefix) out.RawString(prefix)
x.Origin.MarshalEasyJSON(out) x.Origin.MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -368,17 +368,32 @@ func (x *Status_Detail) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"id\":" if x.Id != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"id\":"
out.RawString(prefix)
out.Uint32(x.Id) out.Uint32(x.Id)
} }
}
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.Value) out.Base64Bytes(x.Value)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -554,19 +569,40 @@ func (x *Status) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"code\":" if x.Code != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"code\":"
out.RawString(prefix)
out.Uint32(x.Code) out.Uint32(x.Code)
} }
}
{ {
const prefix string = ",\"message\":" if len(x.Message) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"message\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.Message) out.String(x.Message)
} }
}
{ {
const prefix string = ",\"details\":" if len(x.Details) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"details\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Details { for i := range x.Details {
@ -577,6 +613,7 @@ func (x *Status) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -140,19 +140,40 @@ func (x *Tombstone) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"expirationEpoch\":" if x.ExpirationEpoch != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"expirationEpoch\":"
out.RawString(prefix)
out.Uint64(x.ExpirationEpoch) out.Uint64(x.ExpirationEpoch)
} }
}
{ {
const prefix string = ",\"splitID\":" if len(x.SplitId) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"splitID\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.SplitId) out.Base64Bytes(x.SplitId)
} }
}
{ {
const prefix string = ",\"members\":" if len(x.Members) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"members\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.Members { for i := range x.Members {
@ -163,6 +184,7 @@ func (x *Tombstone) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -130,12 +130,20 @@ func (x *Primitives_Aux) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"innerField\":" if x.InnerField != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"innerField\":"
out.RawString(prefix)
out.Uint32(x.InnerField) out.Uint32(x.InnerField)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -560,59 +568,136 @@ func (x *Primitives) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"fieldA\":" if len(x.FieldA) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldA\":"
out.RawString(prefix)
out.Base64Bytes(x.FieldA) out.Base64Bytes(x.FieldA)
} }
}
{ {
const prefix string = ",\"fieldB\":" if len(x.FieldB) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldB\":"
out.RawString(prefix) out.RawString(prefix)
out.String(x.FieldB) out.String(x.FieldB)
} }
}
{ {
const prefix string = ",\"fieldC\":" if x.FieldC {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldC\":"
out.RawString(prefix) out.RawString(prefix)
out.Bool(x.FieldC) out.Bool(x.FieldC)
} }
}
{ {
const prefix string = ",\"fieldD\":" if x.FieldD != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldD\":"
out.RawString(prefix) out.RawString(prefix)
out.Int32(x.FieldD) out.Int32(x.FieldD)
} }
}
{ {
const prefix string = ",\"fieldE\":" if x.FieldE != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldE\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.FieldE) out.Uint32(x.FieldE)
} }
}
{ {
const prefix string = ",\"fieldF\":" if x.FieldF != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldF\":"
out.RawString(prefix) out.RawString(prefix)
out.Int64(x.FieldF) out.Int64(x.FieldF)
} }
}
{ {
const prefix string = ",\"fieldG\":" if x.FieldG != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldG\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.FieldG) out.Uint64(x.FieldG)
} }
}
{ {
const prefix string = ",\"fieldI\":" if x.FieldI != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldI\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.FieldI) out.Uint64(x.FieldI)
} }
}
{ {
const prefix string = ",\"fieldJ\":" if x.FieldJ != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldJ\":"
out.RawString(prefix) out.RawString(prefix)
out.Float64(x.FieldJ) out.Float64(x.FieldJ)
} }
}
{ {
const prefix string = ",\"fieldK\":" if x.FieldK != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldK\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(x.FieldK) out.Uint32(x.FieldK)
} }
}
{ {
const prefix string = ",\"fieldH\":" if x.FieldH != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldH\":"
out.RawString(prefix) out.RawString(prefix)
v := int32(x.FieldH) v := int32(x.FieldH)
if vv, ok := Primitives_SomeEnum_name[v]; ok { if vv, ok := Primitives_SomeEnum_name[v]; ok {
@ -621,26 +706,48 @@ func (x *Primitives) MarshalEasyJSON(out *jwriter.Writer) {
out.Int32(v) out.Int32(v)
} }
} }
}
switch xx := x.FieldM.(type) { switch xx := x.FieldM.(type) {
case *Primitives_FieldMa: case *Primitives_FieldMa:
{ {
const prefix string = ",\"fieldMa\":" if len(xx.FieldMa) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldMa\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(xx.FieldMa) out.Base64Bytes(xx.FieldMa)
} }
}
case *Primitives_FieldMe: case *Primitives_FieldMe:
{ {
const prefix string = ",\"fieldMe\":" if xx.FieldMe != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldMe\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint32(xx.FieldMe) out.Uint32(xx.FieldMe)
} }
}
case *Primitives_FieldAux: case *Primitives_FieldAux:
{ {
const prefix string = ",\"fieldAux\":" if xx.FieldAux != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldAux\":"
out.RawString(prefix) out.RawString(prefix)
xx.FieldAux.MarshalEasyJSON(out) xx.FieldAux.MarshalEasyJSON(out)
} }
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -887,12 +994,20 @@ func (x *RepPrimitives_Aux) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"innerField\":" if x.InnerField != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"innerField\":"
out.RawString(prefix)
out.Uint32(x.InnerField) out.Uint32(x.InnerField)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1169,10 +1284,17 @@ func (x *RepPrimitives) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"fieldA\":" if len(x.FieldA) != 0 {
out.RawString(prefix[1:]) if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldA\":"
out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.FieldA { for i := range x.FieldA {
if i != 0 { if i != 0 {
@ -1182,8 +1304,15 @@ func (x *RepPrimitives) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"fieldB\":" if len(x.FieldB) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldB\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.FieldB { for i := range x.FieldB {
@ -1194,8 +1323,15 @@ func (x *RepPrimitives) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"fieldC\":" if len(x.FieldC) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldC\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.FieldC { for i := range x.FieldC {
@ -1206,8 +1342,15 @@ func (x *RepPrimitives) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"fieldD\":" if len(x.FieldD) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldD\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.FieldD { for i := range x.FieldD {
@ -1218,8 +1361,15 @@ func (x *RepPrimitives) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"fieldE\":" if len(x.FieldE) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldE\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.FieldE { for i := range x.FieldE {
@ -1230,8 +1380,15 @@ func (x *RepPrimitives) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"fieldF\":" if len(x.FieldF) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldF\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.FieldF { for i := range x.FieldF {
@ -1242,8 +1399,15 @@ func (x *RepPrimitives) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"fieldFu\":" if len(x.FieldFu) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldFu\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.FieldFu { for i := range x.FieldFu {
@ -1254,8 +1418,15 @@ func (x *RepPrimitives) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
{ {
const prefix string = ",\"fieldAux\":" if len(x.FieldAux) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldAux\":"
out.RawString(prefix) out.RawString(prefix)
out.RawByte('[') out.RawByte('[')
for i := range x.FieldAux { for i := range x.FieldAux {
@ -1266,6 +1437,7 @@ func (x *RepPrimitives) MarshalEasyJSON(out *jwriter.Writer) {
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }

View file

@ -147,8 +147,11 @@ func emitJSONMarshal(g *protogen.GeneratedFile, msg *protogen.Message) {
g.P("func (x *", msg.GoIdent.GoName, ") MarshalEasyJSON(out *", jwriterPackage.Ident("Writer"), ") {") g.P("func (x *", msg.GoIdent.GoName, ") MarshalEasyJSON(out *", jwriterPackage.Ident("Writer"), ") {")
g.P(`if x == nil { out.RawString("null"); return }`) g.P(`if x == nil { out.RawString("null"); return }`)
if len(msg.Fields) != 0 {
g.P("first := true")
}
g.P("out.RawByte('{')") g.P("out.RawByte('{')")
for i, f := range msg.Fields { for _, f := range msg.Fields {
if f.Oneof != nil { if f.Oneof != nil {
if f.Oneof.Fields[0] != f { if f.Oneof.Fields[0] != f {
continue continue
@ -157,29 +160,35 @@ func emitJSONMarshal(g *protogen.GeneratedFile, msg *protogen.Message) {
g.P("switch xx := x.", f.Oneof.GoName, ".(type) {") g.P("switch xx := x.", f.Oneof.GoName, ".(type) {")
for _, ff := range f.Oneof.Fields { for _, ff := range f.Oneof.Fields {
g.P("case *", ff.GoIdent, ":") g.P("case *", ff.GoIdent, ":")
emitJSONFieldWrite(g, ff, "xx", i == 0) emitJSONFieldWrite(g, ff, "xx")
} }
g.P("}") g.P("}")
continue continue
} }
emitJSONFieldWrite(g, f, "x", i == 0) emitJSONFieldWrite(g, f, "x")
} }
g.P("out.RawByte('}')") g.P("out.RawByte('}')")
g.P("}") g.P("}")
} }
func emitJSONFieldWrite(g *protogen.GeneratedFile, f *protogen.Field, name string, first bool) { func emitJSONFieldWrite(g *protogen.GeneratedFile, f *protogen.Field, name string) {
g.P("{") g.P("{")
defer g.P("}") defer g.P("}")
g.P("const prefix string = ", `",\"`, fieldJSONName(f), `\":"`)
if first {
g.P("out.RawString(prefix[1:])")
} else {
g.P("out.RawString(prefix)")
}
selector := name + "." + f.GoName selector := name + "." + f.GoName
isNotDefault := notNil
if f.Desc.IsList() {
isNotDefault = notEmpty
} else if f.Desc.Kind() != protoreflect.MessageKind {
_, isNotDefault = easyprotoKindInfo(f.Desc.Kind())
}
g.P("if ", isNotDefault(selector), "{")
defer g.P("}")
g.P("if !first { out.RawByte(','); } else { first = false; }")
g.P("const prefix string = ", `"\"`, fieldJSONName(f), `\":"`)
g.P("out.RawString(prefix)")
if f.Desc.IsList() { if f.Desc.IsList() {
selector += "[i]" selector += "[i]"
g.P("out.RawByte('[')") g.P("out.RawByte('[')")