[#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,11 +98,19 @@ 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 {
x.OwnerId.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerId\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -295,21 +303,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -452,11 +482,19 @@ 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 {
x.Balance.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"balance\":"
out.RawString(prefix)
x.Balance.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -649,21 +687,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -113,16 +113,31 @@ 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.Int64(x.Value) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.Int64(x.Value)
}
} }
{ {
const prefix string = ",\"precision\":" if x.Precision != 0 {
out.RawString(prefix) if !first {
out.Uint32(x.Precision) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"precision\":"
out.RawString(prefix)
out.Uint32(x.Precision)
}
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -352,36 +352,65 @@ 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 {
v := int32(x.HeaderType) out.RawByte(',')
if vv, ok := HeaderType_name[v]; ok { } else {
out.String(vv) first = false
} else { }
out.Int32(v) const prefix string = "\"headerType\":"
out.RawString(prefix)
v := int32(x.HeaderType)
if vv, ok := HeaderType_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
} }
} }
{ {
const prefix string = ",\"matchType\":" if x.MatchType != 0 {
out.RawString(prefix) if !first {
v := int32(x.MatchType) out.RawByte(',')
if vv, ok := MatchType_name[v]; ok { } else {
out.String(vv) first = false
} else { }
out.Int32(v) const prefix string = "\"matchType\":"
out.RawString(prefix)
v := int32(x.MatchType)
if vv, ok := MatchType_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
} }
} }
{ {
const prefix string = ",\"key\":" if len(x.Key) != 0 {
out.RawString(prefix) if !first {
out.String(x.Key) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.String(x.Key)
}
} }
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
out.RawString(prefix) if !first {
out.String(x.Value) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.String(x.Value)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -576,28 +605,43 @@ 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 {
v := int32(x.Role) out.RawByte(',')
if vv, ok := Role_name[v]; ok { } else {
out.String(vv) first = false
} else { }
out.Int32(v) const prefix string = "\"role\":"
out.RawString(prefix)
v := int32(x.Role)
if vv, ok := Role_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
} }
} }
{ {
const prefix string = ",\"keys\":" if len(x.Keys) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.Keys {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
out.Base64Bytes(x.Keys[i]) const prefix string = "\"keys\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Keys {
if i != 0 {
out.RawByte(',')
}
out.Base64Bytes(x.Keys[i])
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }
@ -823,50 +867,79 @@ 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 {
v := int32(x.Operation)
if vv, ok := Operation_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
}
{
const prefix string = ",\"action\":"
out.RawString(prefix)
v := int32(x.Action)
if vv, ok := Action_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
}
{
const prefix string = ",\"filters\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Filters {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
}
const prefix string = "\"operation\":"
out.RawString(prefix)
v := int32(x.Operation)
if vv, ok := Operation_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
} }
x.Filters[i].MarshalEasyJSON(out)
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"targets\":" if x.Action != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.Targets {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
}
const prefix string = "\"action\":"
out.RawString(prefix)
v := int32(x.Action)
if vv, ok := Action_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
} }
x.Targets[i].MarshalEasyJSON(out)
} }
out.RawByte(']') }
{
if len(x.Filters) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"filters\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Filters {
if i != 0 {
out.RawByte(',')
}
x.Filters[i].MarshalEasyJSON(out)
}
out.RawByte(']')
}
}
{
if len(x.Targets) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"targets\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Targets {
if i != 0 {
out.RawByte(',')
}
x.Targets[i].MarshalEasyJSON(out)
}
out.RawByte(']')
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1109,28 +1182,50 @@ 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 {
x.Version.MarshalEasyJSON(out)
}
{
const prefix string = ",\"containerID\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out)
}
{
const prefix string = ",\"records\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Records {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Records[i].MarshalEasyJSON(out) const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out)
}
}
{
if x.ContainerId != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerID\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out)
}
}
{
if len(x.Records) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"records\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Records {
if i != 0 {
out.RawByte(',')
}
x.Records[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1317,21 +1412,43 @@ 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.Uint64(x.Exp) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"exp\":"
out.RawString(prefix)
out.Uint64(x.Exp)
}
} }
{ {
const prefix string = ",\"nbf\":" if x.Nbf != 0 {
out.RawString(prefix) if !first {
out.Uint64(x.Nbf) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"nbf\":"
out.RawString(prefix)
out.Uint64(x.Nbf)
}
} }
{ {
const prefix string = ",\"iat\":" if x.Iat != 0 {
out.RawString(prefix) if !first {
out.Uint64(x.Iat) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"iat\":"
out.RawString(prefix)
out.Uint64(x.Iat)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1497,23 +1614,38 @@ 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 {
x.Target.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"target\":"
out.RawString(prefix)
x.Target.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"chains\":" if len(x.Chains) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.Chains {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Chains[i].MarshalEasyJSON(out) const prefix string = "\"chains\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Chains {
if i != 0 {
out.RawByte(',')
}
x.Chains[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1745,31 +1877,67 @@ 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 {
x.EaclTable.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"eaclTable\":"
out.RawString(prefix)
x.EaclTable.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"ownerID\":" if x.OwnerId != nil {
out.RawString(prefix) if !first {
x.OwnerId.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerID\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"lifetime\":" if x.Lifetime != nil {
out.RawString(prefix) if !first {
x.Lifetime.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"lifetime\":"
out.RawString(prefix)
x.Lifetime.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"allowImpersonate\":" if x.AllowImpersonate {
out.RawString(prefix) if !first {
out.Bool(x.AllowImpersonate) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"allowImpersonate\":"
out.RawString(prefix)
out.Bool(x.AllowImpersonate)
}
} }
{ {
const prefix string = ",\"apeOverride\":" if x.ApeOverride != nil {
out.RawString(prefix) if !first {
x.ApeOverride.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"apeOverride\":"
out.RawString(prefix)
x.ApeOverride.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1948,16 +2116,31 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"signature\":" if x.Signature != nil {
out.RawString(prefix) if !first {
x.Signature.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix)
x.Signature.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -155,21 +155,36 @@ 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 {
v := int32(x.Type) out.RawByte(',')
if vv, ok := TargetType_name[v]; ok { } else {
out.String(vv) first = false
} else { }
out.Int32(v) const prefix string = "\"type\":"
out.RawString(prefix)
v := int32(x.Type)
if vv, ok := TargetType_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
} }
} }
{ {
const prefix string = ",\"name\":" if len(x.Name) != 0 {
out.RawString(prefix) if !first {
out.String(x.Name) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"name\":"
out.RawString(prefix)
out.String(x.Name)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -338,13 +353,21 @@ 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.Base64Bytes(xx.Raw) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"raw\":"
out.RawString(prefix)
out.Base64Bytes(xx.Raw)
}
} }
} }
out.RawByte('}') out.RawByte('}')

View file

@ -121,16 +121,31 @@ 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 {
x.Target.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"target\":"
out.RawString(prefix)
x.Target.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"chain\":" if x.Chain != nil {
out.RawString(prefix) if !first {
x.Chain.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"chain\":"
out.RawString(prefix)
x.Chain.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -330,21 +345,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -484,11 +521,19 @@ 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.Base64Bytes(x.ChainId) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"chainId\":"
out.RawString(prefix)
out.Base64Bytes(x.ChainId)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -680,21 +725,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -857,16 +924,31 @@ 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 {
x.Target.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"target\":"
out.RawString(prefix)
x.Target.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"chainId\":" if len(x.ChainId) != 0 {
out.RawString(prefix) if !first {
out.Base64Bytes(x.ChainId) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"chainId\":"
out.RawString(prefix)
out.Base64Bytes(x.ChainId)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1065,21 +1147,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1381,21 +1485,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1538,11 +1664,19 @@ 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 {
x.Target.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"target\":"
out.RawString(prefix)
x.Target.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1735,21 +1869,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1895,18 +2051,26 @@ 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('[')
for i := range x.Chains {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Chains[i].MarshalEasyJSON(out) const prefix string = "\"chains\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Chains {
if i != 0 {
out.RawByte(',')
}
x.Chains[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2106,21 +2270,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -121,16 +121,31 @@ 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 {
x.Container.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"container\":"
out.RawString(prefix)
x.Container.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"signature\":" if x.Signature != nil {
out.RawString(prefix) if !first {
x.Signature.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix)
x.Signature.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -330,21 +345,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -487,11 +524,19 @@ 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 {
x.ContainerId.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerId\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -684,21 +729,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -864,16 +931,31 @@ 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 {
x.ContainerId.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerId\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"signature\":" if x.Signature != nil {
out.RawString(prefix) if !first {
x.Signature.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix)
x.Signature.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1073,21 +1155,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1389,21 +1493,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1546,11 +1672,19 @@ 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 {
x.ContainerId.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerId\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1743,21 +1877,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1946,21 +2102,43 @@ 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 {
x.Container.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"container\":"
out.RawString(prefix)
x.Container.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"signature\":" if x.Signature != nil {
out.RawString(prefix) if !first {
x.Signature.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix)
x.Signature.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"sessionToken\":" if x.SessionToken != nil {
out.RawString(prefix) if !first {
x.SessionToken.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sessionToken\":"
out.RawString(prefix)
x.SessionToken.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2167,21 +2345,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2324,11 +2524,19 @@ 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 {
x.OwnerId.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerId\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2521,21 +2729,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2681,18 +2911,26 @@ 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('[')
for i := range x.ContainerIds {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.ContainerIds[i].MarshalEasyJSON(out) const prefix string = "\"containerIds\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.ContainerIds {
if i != 0 {
out.RawByte(',')
}
x.ContainerIds[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2892,21 +3130,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -115,16 +115,31 @@ 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.String(x.Key) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.String(x.Key)
}
} }
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
out.RawString(prefix) if !first {
out.String(x.Value) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.String(x.Value)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -370,43 +385,86 @@ 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 {
x.Version.MarshalEasyJSON(out)
}
{
const prefix string = ",\"ownerID\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
{
const prefix string = ",\"nonce\":"
out.RawString(prefix)
out.Base64Bytes(x.Nonce)
}
{
const prefix string = ",\"basicACL\":"
out.RawString(prefix)
out.Uint32(x.BasicAcl)
}
{
const prefix string = ",\"attributes\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Attributes {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Attributes[i].MarshalEasyJSON(out) const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out)
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"placementPolicy\":" if x.OwnerId != nil {
out.RawString(prefix) if !first {
x.PlacementPolicy.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerID\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
}
{
if len(x.Nonce) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"nonce\":"
out.RawString(prefix)
out.Base64Bytes(x.Nonce)
}
}
{
if x.BasicAcl != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"basicACL\":"
out.RawString(prefix)
out.Uint32(x.BasicAcl)
}
}
{
if len(x.Attributes) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"attributes\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Attributes {
if i != 0 {
out.RawByte(',')
}
x.Attributes[i].MarshalEasyJSON(out)
}
out.RawByte(']')
}
}
{
if x.PlacementPolicy != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"placementPolicy\":"
out.RawString(prefix)
x.PlacementPolicy.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -100,18 +100,26 @@ 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('[')
for i := range x.Members {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Members[i].MarshalEasyJSON(out) const prefix string = "\"members\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Members {
if i != 0 {
out.RawByte(',')
}
x.Members[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -257,21 +257,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -437,16 +459,31 @@ 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 {
x.Version.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"nodeInfo\":" if x.NodeInfo != nil {
out.RawString(prefix) if !first {
x.NodeInfo.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"nodeInfo\":"
out.RawString(prefix)
x.NodeInfo.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -646,21 +683,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -962,21 +1021,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1119,11 +1200,19 @@ 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 {
x.NetworkInfo.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"networkInfo\":"
out.RawString(prefix)
x.NetworkInfo.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1316,21 +1405,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1632,21 +1743,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1789,11 +1922,19 @@ 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 {
x.Netmap.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"netmap\":"
out.RawString(prefix)
x.Netmap.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1986,21 +2127,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -274,43 +274,79 @@ 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.String(x.Name)
}
{
const prefix string = ",\"key\":"
out.RawString(prefix)
out.String(x.Key)
}
{
const prefix string = ",\"op\":"
out.RawString(prefix)
v := int32(x.Op)
if vv, ok := Operation_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
}
{
const prefix string = ",\"value\":"
out.RawString(prefix)
out.String(x.Value)
}
{
const prefix string = ",\"filters\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Filters {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Filters[i].MarshalEasyJSON(out) const prefix string = "\"name\":"
out.RawString(prefix)
out.String(x.Name)
}
}
{
if len(x.Key) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.String(x.Key)
}
}
{
if x.Op != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"op\":"
out.RawString(prefix)
v := int32(x.Op)
if vv, ok := Operation_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
}
}
{
if len(x.Value) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.String(x.Value)
}
}
{
if len(x.Filters) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"filters\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Filters {
if i != 0 {
out.RawByte(',')
}
x.Filters[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }
@ -563,36 +599,72 @@ 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.String(x.Name) out.RawByte(',')
} } else {
{ first = false
const prefix string = ",\"count\":" }
out.RawString(prefix) const prefix string = "\"name\":"
out.Uint32(x.Count) out.RawString(prefix)
} out.String(x.Name)
{
const prefix string = ",\"clause\":"
out.RawString(prefix)
v := int32(x.Clause)
if vv, ok := Clause_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
} }
} }
{ {
const prefix string = ",\"attribute\":" if x.Count != 0 {
out.RawString(prefix) if !first {
out.String(x.Attribute) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"count\":"
out.RawString(prefix)
out.Uint32(x.Count)
}
} }
{ {
const prefix string = ",\"filter\":" if x.Clause != 0 {
out.RawString(prefix) if !first {
out.String(x.Filter) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"clause\":"
out.RawString(prefix)
v := int32(x.Clause)
if vv, ok := Clause_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
}
}
{
if len(x.Attribute) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"attribute\":"
out.RawString(prefix)
out.String(x.Attribute)
}
}
{
if len(x.Filter) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"filter\":"
out.RawString(prefix)
out.String(x.Filter)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -817,26 +889,55 @@ 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.Uint32(x.Count) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"count\":"
out.RawString(prefix)
out.Uint32(x.Count)
}
} }
{ {
const prefix string = ",\"selector\":" if len(x.Selector) != 0 {
out.RawString(prefix) if !first {
out.String(x.Selector) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"selector\":"
out.RawString(prefix)
out.String(x.Selector)
}
} }
{ {
const prefix string = ",\"ecDataCount\":" if x.EcDataCount != 0 {
out.RawString(prefix) if !first {
out.Uint32(x.EcDataCount) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ecDataCount\":"
out.RawString(prefix)
out.Uint32(x.EcDataCount)
}
} }
{ {
const prefix string = ",\"ecParityCount\":" if x.EcParityCount != 0 {
out.RawString(prefix) if !first {
out.Uint32(x.EcParityCount) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ecParityCount\":"
out.RawString(prefix)
out.Uint32(x.EcParityCount)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1077,52 +1178,88 @@ 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('[')
for i := range x.Replicas {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Replicas[i].MarshalEasyJSON(out) const prefix string = "\"replicas\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Replicas {
if i != 0 {
out.RawByte(',')
}
x.Replicas[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"containerBackupFactor\":" if x.ContainerBackupFactor != 0 {
out.RawString(prefix) if !first {
out.Uint32(x.ContainerBackupFactor)
}
{
const prefix string = ",\"selectors\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Selectors {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Selectors[i].MarshalEasyJSON(out) const prefix string = "\"containerBackupFactor\":"
out.RawString(prefix)
out.Uint32(x.ContainerBackupFactor)
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"filters\":" if len(x.Selectors) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.Filters {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Filters[i].MarshalEasyJSON(out) const prefix string = "\"selectors\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Selectors {
if i != 0 {
out.RawByte(',')
}
x.Selectors[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"unique\":" if len(x.Filters) != 0 {
out.RawString(prefix) if !first {
out.Bool(x.Unique) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"filters\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Filters {
if i != 0 {
out.RawByte(',')
}
x.Filters[i].MarshalEasyJSON(out)
}
out.RawByte(']')
}
}
{
if x.Unique {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"unique\":"
out.RawString(prefix)
out.Bool(x.Unique)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1373,28 +1510,50 @@ 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.String(x.Key)
}
{
const prefix string = ",\"value\":"
out.RawString(prefix)
out.String(x.Value)
}
{
const prefix string = ",\"parents\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Parents {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
out.String(x.Parents[i]) const prefix string = "\"key\":"
out.RawString(prefix)
out.String(x.Key)
}
}
{
if len(x.Value) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.String(x.Value)
}
}
{
if len(x.Parents) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parents\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Parents {
if i != 0 {
out.RawByte(',')
}
out.String(x.Parents[i])
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1604,44 +1763,73 @@ 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.Base64Bytes(x.PublicKey)
}
{
const prefix string = ",\"addresses\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Addresses {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
out.String(x.Addresses[i]) const prefix string = "\"publicKey\":"
out.RawString(prefix)
out.Base64Bytes(x.PublicKey)
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"attributes\":" if len(x.Addresses) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.Attributes {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Attributes[i].MarshalEasyJSON(out) const prefix string = "\"addresses\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Addresses {
if i != 0 {
out.RawByte(',')
}
out.String(x.Addresses[i])
}
out.RawByte(']')
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"state\":" if len(x.Attributes) != 0 {
out.RawString(prefix) if !first {
v := int32(x.State) out.RawByte(',')
if vv, ok := NodeInfo_State_name[v]; ok { } else {
out.String(vv) first = false
} else { }
out.Int32(v) const prefix string = "\"attributes\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Attributes {
if i != 0 {
out.RawByte(',')
}
x.Attributes[i].MarshalEasyJSON(out)
}
out.RawByte(']')
}
}
{
if x.State != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"state\":"
out.RawString(prefix)
v := int32(x.State)
if vv, ok := NodeInfo_State_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
} }
} }
out.RawByte('}') out.RawByte('}')
@ -1842,23 +2030,38 @@ 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.Uint64(x.Epoch) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"epoch\":"
out.RawString(prefix)
out.Uint64(x.Epoch)
}
} }
{ {
const prefix string = ",\"nodes\":" if len(x.Nodes) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.Nodes {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Nodes[i].MarshalEasyJSON(out) const prefix string = "\"nodes\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Nodes {
if i != 0 {
out.RawByte(',')
}
x.Nodes[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2017,16 +2220,31 @@ 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.Base64Bytes(x.Key) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.Base64Bytes(x.Key)
}
} }
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
out.RawString(prefix) if !first {
out.Base64Bytes(x.Value) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.Base64Bytes(x.Value)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2163,18 +2381,26 @@ 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('[')
for i := range x.Parameters {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Parameters[i].MarshalEasyJSON(out) const prefix string = "\"parameters\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Parameters {
if i != 0 {
out.RawByte(',')
}
x.Parameters[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2370,26 +2596,55 @@ 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.Uint64(x.CurrentEpoch) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"currentEpoch\":"
out.RawString(prefix)
out.Uint64(x.CurrentEpoch)
}
} }
{ {
const prefix string = ",\"magicNumber\":" if x.MagicNumber != 0 {
out.RawString(prefix) if !first {
out.Uint64(x.MagicNumber) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"magicNumber\":"
out.RawString(prefix)
out.Uint64(x.MagicNumber)
}
} }
{ {
const prefix string = ",\"msPerBlock\":" if x.MsPerBlock != 0 {
out.RawString(prefix) if !first {
out.Int64(x.MsPerBlock) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"msPerBlock\":"
out.RawString(prefix)
out.Int64(x.MsPerBlock)
}
} }
{ {
const prefix string = ",\"networkConfig\":" if x.NetworkConfig != nil {
out.RawString(prefix) if !first {
x.NetworkConfig.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"networkConfig\":"
out.RawString(prefix)
x.NetworkConfig.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }

File diff suppressed because it is too large Load diff

View file

@ -304,46 +304,96 @@ 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 {
x.Version.MarshalEasyJSON(out) out.RawByte(',')
} } else {
{ first = false
const prefix string = ",\"creationEpoch\":" }
out.RawString(prefix) const prefix string = "\"version\":"
out.Uint64(x.CreationEpoch) out.RawString(prefix)
} x.Version.MarshalEasyJSON(out)
{
const prefix string = ",\"ownerID\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
{
const prefix string = ",\"objectType\":"
out.RawString(prefix)
v := int32(x.ObjectType)
if vv, ok := ObjectType_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
} }
} }
{ {
const prefix string = ",\"payloadLength\":" if x.CreationEpoch != 0 {
out.RawString(prefix) if !first {
out.Uint64(x.PayloadLength) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"creationEpoch\":"
out.RawString(prefix)
out.Uint64(x.CreationEpoch)
}
} }
{ {
const prefix string = ",\"payloadHash\":" if x.OwnerId != nil {
out.RawString(prefix) if !first {
x.PayloadHash.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerID\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"homomorphicHash\":" if x.ObjectType != 0 {
out.RawString(prefix) if !first {
x.HomomorphicHash.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"objectType\":"
out.RawString(prefix)
v := int32(x.ObjectType)
if vv, ok := ObjectType_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
}
}
{
if x.PayloadLength != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"payloadLength\":"
out.RawString(prefix)
out.Uint64(x.PayloadLength)
}
}
{
if x.PayloadHash != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"payloadHash\":"
out.RawString(prefix)
x.PayloadHash.MarshalEasyJSON(out)
}
}
{
if x.HomomorphicHash != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"homomorphicHash\":"
out.RawString(prefix)
x.HomomorphicHash.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -544,16 +594,31 @@ 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.String(x.Key) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.String(x.Key)
}
} }
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
out.RawString(prefix) if !first {
out.String(x.Value) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.String(x.Value)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -802,43 +867,86 @@ 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 {
x.Parent.MarshalEasyJSON(out)
}
{
const prefix string = ",\"previous\":"
out.RawString(prefix)
x.Previous.MarshalEasyJSON(out)
}
{
const prefix string = ",\"parentSignature\":"
out.RawString(prefix)
x.ParentSignature.MarshalEasyJSON(out)
}
{
const prefix string = ",\"parentHeader\":"
out.RawString(prefix)
x.ParentHeader.MarshalEasyJSON(out)
}
{
const prefix string = ",\"children\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Children {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Children[i].MarshalEasyJSON(out) const prefix string = "\"parent\":"
out.RawString(prefix)
x.Parent.MarshalEasyJSON(out)
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"splitID\":" if x.Previous != nil {
out.RawString(prefix) if !first {
out.Base64Bytes(x.SplitId) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"previous\":"
out.RawString(prefix)
x.Previous.MarshalEasyJSON(out)
}
}
{
if x.ParentSignature != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parentSignature\":"
out.RawString(prefix)
x.ParentSignature.MarshalEasyJSON(out)
}
}
{
if x.ParentHeader != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parentHeader\":"
out.RawString(prefix)
x.ParentHeader.MarshalEasyJSON(out)
}
}
{
if len(x.Children) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"children\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Children {
if i != 0 {
out.RawByte(',')
}
x.Children[i].MarshalEasyJSON(out)
}
out.RawByte(']')
}
}
{
if len(x.SplitId) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"splitID\":"
out.RawString(prefix)
out.Base64Bytes(x.SplitId)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1157,53 +1265,110 @@ 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 {
x.Parent.MarshalEasyJSON(out)
}
{
const prefix string = ",\"index\":"
out.RawString(prefix)
out.Uint32(x.Index)
}
{
const prefix string = ",\"total\":"
out.RawString(prefix)
out.Uint32(x.Total)
}
{
const prefix string = ",\"headerLength\":"
out.RawString(prefix)
out.Uint32(x.HeaderLength)
}
{
const prefix string = ",\"header\":"
out.RawString(prefix)
out.Base64Bytes(x.Header)
}
{
const prefix string = ",\"parentSplitID\":"
out.RawString(prefix)
out.Base64Bytes(x.ParentSplitId)
}
{
const prefix string = ",\"parentSplitParentID\":"
out.RawString(prefix)
x.ParentSplitParentId.MarshalEasyJSON(out)
}
{
const prefix string = ",\"parentAttributes\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.ParentAttributes {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.ParentAttributes[i].MarshalEasyJSON(out) const prefix string = "\"parent\":"
out.RawString(prefix)
x.Parent.MarshalEasyJSON(out)
}
}
{
if x.Index != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"index\":"
out.RawString(prefix)
out.Uint32(x.Index)
}
}
{
if x.Total != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"total\":"
out.RawString(prefix)
out.Uint32(x.Total)
}
}
{
if x.HeaderLength != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"headerLength\":"
out.RawString(prefix)
out.Uint32(x.HeaderLength)
}
}
{
if len(x.Header) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"header\":"
out.RawString(prefix)
out.Base64Bytes(x.Header)
}
}
{
if len(x.ParentSplitId) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parentSplitID\":"
out.RawString(prefix)
out.Base64Bytes(x.ParentSplitId)
}
}
{
if x.ParentSplitParentId != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parentSplitParentID\":"
out.RawString(prefix)
x.ParentSplitParentId.MarshalEasyJSON(out)
}
}
{
if len(x.ParentAttributes) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"parentAttributes\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.ParentAttributes {
if i != 0 {
out.RawByte(',')
}
x.ParentAttributes[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1630,78 +1795,163 @@ 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 {
x.Version.MarshalEasyJSON(out)
}
{
const prefix string = ",\"containerID\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out)
}
{
const prefix string = ",\"ownerID\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
{
const prefix string = ",\"creationEpoch\":"
out.RawString(prefix)
out.Uint64(x.CreationEpoch)
}
{
const prefix string = ",\"payloadLength\":"
out.RawString(prefix)
out.Uint64(x.PayloadLength)
}
{
const prefix string = ",\"payloadHash\":"
out.RawString(prefix)
x.PayloadHash.MarshalEasyJSON(out)
}
{
const prefix string = ",\"objectType\":"
out.RawString(prefix)
v := int32(x.ObjectType)
if vv, ok := ObjectType_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
}
{
const prefix string = ",\"homomorphicHash\":"
out.RawString(prefix)
x.HomomorphicHash.MarshalEasyJSON(out)
}
{
const prefix string = ",\"sessionToken\":"
out.RawString(prefix)
x.SessionToken.MarshalEasyJSON(out)
}
{
const prefix string = ",\"attributes\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Attributes {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Attributes[i].MarshalEasyJSON(out) const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out)
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"split\":" if x.ContainerId != nil {
out.RawString(prefix) if !first {
x.Split.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerID\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"ec\":" if x.OwnerId != nil {
out.RawString(prefix) if !first {
x.Ec.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerID\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
}
{
if x.CreationEpoch != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"creationEpoch\":"
out.RawString(prefix)
out.Uint64(x.CreationEpoch)
}
}
{
if x.PayloadLength != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"payloadLength\":"
out.RawString(prefix)
out.Uint64(x.PayloadLength)
}
}
{
if x.PayloadHash != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"payloadHash\":"
out.RawString(prefix)
x.PayloadHash.MarshalEasyJSON(out)
}
}
{
if x.ObjectType != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"objectType\":"
out.RawString(prefix)
v := int32(x.ObjectType)
if vv, ok := ObjectType_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
}
}
{
if x.HomomorphicHash != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"homomorphicHash\":"
out.RawString(prefix)
x.HomomorphicHash.MarshalEasyJSON(out)
}
}
{
if x.SessionToken != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sessionToken\":"
out.RawString(prefix)
x.SessionToken.MarshalEasyJSON(out)
}
}
{
if len(x.Attributes) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"attributes\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Attributes {
if i != 0 {
out.RawByte(',')
}
x.Attributes[i].MarshalEasyJSON(out)
}
out.RawByte(']')
}
}
{
if x.Split != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"split\":"
out.RawString(prefix)
x.Split.MarshalEasyJSON(out)
}
}
{
if x.Ec != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ec\":"
out.RawString(prefix)
x.Ec.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1993,26 +2243,55 @@ 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 {
x.ObjectId.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"objectID\":"
out.RawString(prefix)
x.ObjectId.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"signature\":" if x.Signature != nil {
out.RawString(prefix) if !first {
x.Signature.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix)
x.Signature.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"header\":" if x.Header != nil {
out.RawString(prefix) if !first {
x.Header.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"header\":"
out.RawString(prefix)
x.Header.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"payload\":" if len(x.Payload) != 0 {
out.RawString(prefix) if !first {
out.Base64Bytes(x.Payload) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"payload\":"
out.RawString(prefix)
out.Base64Bytes(x.Payload)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2204,21 +2483,43 @@ 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.Base64Bytes(x.SplitId) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"splitId\":"
out.RawString(prefix)
out.Base64Bytes(x.SplitId)
}
} }
{ {
const prefix string = ",\"lastPart\":" if x.LastPart != nil {
out.RawString(prefix) if !first {
x.LastPart.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"lastPart\":"
out.RawString(prefix)
x.LastPart.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"link\":" if x.Link != nil {
out.RawString(prefix) if !first {
x.Link.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"link\":"
out.RawString(prefix)
x.Link.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2400,21 +2701,43 @@ 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 {
x.Id.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"id\":"
out.RawString(prefix)
x.Id.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"index\":" if x.Index != 0 {
out.RawString(prefix) if !first {
out.Uint32(x.Index) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"index\":"
out.RawString(prefix)
out.Uint32(x.Index)
}
} }
{ {
const prefix string = ",\"total\":" if x.Total != 0 {
out.RawString(prefix) if !first {
out.Uint32(x.Total) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"total\":"
out.RawString(prefix)
out.Uint32(x.Total)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2558,18 +2881,26 @@ 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('[')
for i := range x.Chunks {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Chunks[i].MarshalEasyJSON(out) const prefix string = "\"chunks\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Chunks {
if i != 0 {
out.RawByte(',')
}
x.Chunks[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -190,16 +190,31 @@ 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 {
x.ContainerId.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerID\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"objectID\":" if x.ObjectId != nil {
out.RawString(prefix) if !first {
x.ObjectId.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"objectID\":"
out.RawString(prefix)
x.ObjectId.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -332,11 +347,19 @@ 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.Base64Bytes(x.Value) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.Base64Bytes(x.Value)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -461,11 +484,19 @@ 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.Base64Bytes(x.Value) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.Base64Bytes(x.Value)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -590,11 +621,19 @@ 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.Base64Bytes(x.Value) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.Base64Bytes(x.Value)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -739,16 +778,31 @@ 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.Uint32(x.Major) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"major\":"
out.RawString(prefix)
out.Uint32(x.Major)
}
} }
{ {
const prefix string = ",\"minor\":" if x.Minor != 0 {
out.RawString(prefix) if !first {
out.Uint32(x.Minor) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"minor\":"
out.RawString(prefix)
out.Uint32(x.Minor)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -919,25 +973,47 @@ 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.Base64Bytes(x.Key) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.Base64Bytes(x.Key)
}
} }
{ {
const prefix string = ",\"signature\":" if len(x.Sign) != 0 {
out.RawString(prefix) if !first {
out.Base64Bytes(x.Sign) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix)
out.Base64Bytes(x.Sign)
}
} }
{ {
const prefix string = ",\"scheme\":" if x.Scheme != 0 {
out.RawString(prefix) if !first {
v := int32(x.Scheme) out.RawByte(',')
if vv, ok := SignatureScheme_name[v]; ok { } else {
out.String(vv) first = false
} else { }
out.Int32(v) const prefix string = "\"scheme\":"
out.RawString(prefix)
v := int32(x.Scheme)
if vv, ok := SignatureScheme_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
} }
} }
out.RawByte('}') out.RawByte('}')
@ -1111,16 +1187,31 @@ 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.Base64Bytes(x.Key) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.Base64Bytes(x.Key)
}
} }
{ {
const prefix string = ",\"signature\":" if len(x.Sign) != 0 {
out.RawString(prefix) if !first {
out.Base64Bytes(x.Sign) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix)
out.Base64Bytes(x.Sign)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1271,21 +1362,36 @@ 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 {
v := int32(x.Type) out.RawByte(',')
if vv, ok := ChecksumType_name[v]; ok { } else {
out.String(vv) first = false
} else { }
out.Int32(v) const prefix string = "\"type\":"
out.RawString(prefix)
v := int32(x.Type)
if vv, ok := ChecksumType_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
} }
} }
{ {
const prefix string = ",\"sum\":" if len(x.Sum) != 0 {
out.RawString(prefix) if !first {
out.Base64Bytes(x.Sum) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sum\":"
out.RawString(prefix)
out.Base64Bytes(x.Sum)
}
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -117,16 +117,31 @@ 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 {
x.OwnerId.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerId\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"expiration\":" if x.Expiration != 0 {
out.RawString(prefix) if !first {
out.Uint64(x.Expiration) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"expiration\":"
out.RawString(prefix)
out.Uint64(x.Expiration)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -325,21 +340,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -499,16 +536,31 @@ 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.Base64Bytes(x.Id) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"id\":"
out.RawString(prefix)
out.Base64Bytes(x.Id)
}
} }
{ {
const prefix string = ",\"sessionKey\":" if len(x.SessionKey) != 0 {
out.RawString(prefix) if !first {
out.Base64Bytes(x.SessionKey) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sessionKey\":"
out.RawString(prefix)
out.Base64Bytes(x.SessionKey)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -706,21 +758,43 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaHeader\":" if x.MetaHeader != nil {
out.RawString(prefix) if !first {
x.MetaHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaHeader\":"
out.RawString(prefix)
x.MetaHeader.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"verifyHeader\":" if x.VerifyHeader != nil {
out.RawString(prefix) if !first {
x.VerifyHeader.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"verifyHeader\":"
out.RawString(prefix)
x.VerifyHeader.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -179,23 +179,38 @@ 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 {
x.Container.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"container\":"
out.RawString(prefix)
x.Container.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"objects\":" if len(x.Objects) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.Objects {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Objects[i].MarshalEasyJSON(out) const prefix string = "\"objects\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Objects {
if i != 0 {
out.RawByte(',')
}
x.Objects[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }
@ -358,21 +373,36 @@ 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 {
v := int32(x.Verb) out.RawByte(',')
if vv, ok := ObjectSessionContext_Verb_name[v]; ok { } else {
out.String(vv) first = false
} else { }
out.Int32(v) const prefix string = "\"verb\":"
out.RawString(prefix)
v := int32(x.Verb)
if vv, ok := ObjectSessionContext_Verb_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
} }
} }
{ {
const prefix string = ",\"target\":" if x.Target != nil {
out.RawString(prefix) if !first {
x.Target.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"target\":"
out.RawString(prefix)
x.Target.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -601,26 +631,48 @@ 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 {
v := int32(x.Verb) out.RawByte(',')
if vv, ok := ContainerSessionContext_Verb_name[v]; ok { } else {
out.String(vv) first = false
} else { }
out.Int32(v) const prefix string = "\"verb\":"
out.RawString(prefix)
v := int32(x.Verb)
if vv, ok := ContainerSessionContext_Verb_name[v]; ok {
out.String(vv)
} else {
out.Int32(v)
}
} }
} }
{ {
const prefix string = ",\"wildcard\":" if x.Wildcard {
out.RawString(prefix) if !first {
out.Bool(x.Wildcard) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"wildcard\":"
out.RawString(prefix)
out.Bool(x.Wildcard)
}
} }
{ {
const prefix string = ",\"containerID\":" if x.ContainerId != nil {
out.RawString(prefix) if !first {
x.ContainerId.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"containerID\":"
out.RawString(prefix)
x.ContainerId.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -814,21 +866,43 @@ 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.Uint64(x.Exp) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"exp\":"
out.RawString(prefix)
out.Uint64(x.Exp)
}
} }
{ {
const prefix string = ",\"nbf\":" if x.Nbf != 0 {
out.RawString(prefix) if !first {
out.Uint64(x.Nbf) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"nbf\":"
out.RawString(prefix)
out.Uint64(x.Nbf)
}
} }
{ {
const prefix string = ",\"iat\":" if x.Iat != 0 {
out.RawString(prefix) if !first {
out.Uint64(x.Iat) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"iat\":"
out.RawString(prefix)
out.Uint64(x.Iat)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1095,39 +1169,82 @@ 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.Base64Bytes(x.Id) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"id\":"
out.RawString(prefix)
out.Base64Bytes(x.Id)
}
} }
{ {
const prefix string = ",\"ownerID\":" if x.OwnerId != nil {
out.RawString(prefix) if !first {
x.OwnerId.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ownerID\":"
out.RawString(prefix)
x.OwnerId.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"lifetime\":" if x.Lifetime != nil {
out.RawString(prefix) if !first {
x.Lifetime.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"lifetime\":"
out.RawString(prefix)
x.Lifetime.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"sessionKey\":" if len(x.SessionKey) != 0 {
out.RawString(prefix) if !first {
out.Base64Bytes(x.SessionKey) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sessionKey\":"
out.RawString(prefix)
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 {
out.RawString(prefix) if !first {
xx.Object.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"object\":"
out.RawString(prefix)
xx.Object.MarshalEasyJSON(out)
}
} }
case *SessionToken_Body_Container: case *SessionToken_Body_Container:
{ {
const prefix string = ",\"container\":" if xx.Container != nil {
out.RawString(prefix) if !first {
xx.Container.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"container\":"
out.RawString(prefix)
xx.Container.MarshalEasyJSON(out)
}
} }
} }
out.RawByte('}') out.RawByte('}')
@ -1333,16 +1450,31 @@ 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 {
x.Body.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"body\":"
out.RawString(prefix)
x.Body.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"signature\":" if x.Signature != nil {
out.RawString(prefix) if !first {
x.Signature.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix)
x.Signature.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1495,16 +1627,31 @@ 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.String(x.Key) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.String(x.Key)
}
} }
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
out.RawString(prefix) if !first {
out.String(x.Value) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.String(x.Value)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1793,53 +1940,110 @@ 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 {
x.Version.MarshalEasyJSON(out)
}
{
const prefix string = ",\"epoch\":"
out.RawString(prefix)
out.Uint64(x.Epoch)
}
{
const prefix string = ",\"ttl\":"
out.RawString(prefix)
out.Uint32(x.Ttl)
}
{
const prefix string = ",\"xHeaders\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.XHeaders {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.XHeaders[i].MarshalEasyJSON(out) const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out)
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"sessionToken\":" if x.Epoch != 0 {
out.RawString(prefix) if !first {
x.SessionToken.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"epoch\":"
out.RawString(prefix)
out.Uint64(x.Epoch)
}
} }
{ {
const prefix string = ",\"bearerToken\":" if x.Ttl != 0 {
out.RawString(prefix) if !first {
x.BearerToken.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ttl\":"
out.RawString(prefix)
out.Uint32(x.Ttl)
}
} }
{ {
const prefix string = ",\"origin\":" if len(x.XHeaders) != 0 {
out.RawString(prefix) if !first {
x.Origin.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"xHeaders\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.XHeaders {
if i != 0 {
out.RawByte(',')
}
x.XHeaders[i].MarshalEasyJSON(out)
}
out.RawByte(']')
}
} }
{ {
const prefix string = ",\"magicNumber\":" if x.SessionToken != nil {
out.RawString(prefix) if !first {
out.Uint64(x.MagicNumber) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"sessionToken\":"
out.RawString(prefix)
x.SessionToken.MarshalEasyJSON(out)
}
}
{
if x.BearerToken != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"bearerToken\":"
out.RawString(prefix)
x.BearerToken.MarshalEasyJSON(out)
}
}
{
if x.Origin != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"origin\":"
out.RawString(prefix)
x.Origin.MarshalEasyJSON(out)
}
}
{
if x.MagicNumber != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"magicNumber\":"
out.RawString(prefix)
out.Uint64(x.MagicNumber)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2133,43 +2337,86 @@ 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 {
x.Version.MarshalEasyJSON(out)
}
{
const prefix string = ",\"epoch\":"
out.RawString(prefix)
out.Uint64(x.Epoch)
}
{
const prefix string = ",\"ttl\":"
out.RawString(prefix)
out.Uint32(x.Ttl)
}
{
const prefix string = ",\"xHeaders\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.XHeaders {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.XHeaders[i].MarshalEasyJSON(out) const prefix string = "\"version\":"
out.RawString(prefix)
x.Version.MarshalEasyJSON(out)
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"origin\":" if x.Epoch != 0 {
out.RawString(prefix) if !first {
x.Origin.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"epoch\":"
out.RawString(prefix)
out.Uint64(x.Epoch)
}
} }
{ {
const prefix string = ",\"status\":" if x.Ttl != 0 {
out.RawString(prefix) if !first {
x.Status.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"ttl\":"
out.RawString(prefix)
out.Uint32(x.Ttl)
}
}
{
if len(x.XHeaders) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"xHeaders\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.XHeaders {
if i != 0 {
out.RawByte(',')
}
x.XHeaders[i].MarshalEasyJSON(out)
}
out.RawByte(']')
}
}
{
if x.Origin != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"origin\":"
out.RawString(prefix)
x.Origin.MarshalEasyJSON(out)
}
}
{
if x.Status != nil {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"status\":"
out.RawString(prefix)
x.Status.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2407,26 +2654,55 @@ 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 {
x.BodySignature.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"bodySignature\":"
out.RawString(prefix)
x.BodySignature.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaSignature\":" if x.MetaSignature != nil {
out.RawString(prefix) if !first {
x.MetaSignature.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaSignature\":"
out.RawString(prefix)
x.MetaSignature.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"originSignature\":" if x.OriginSignature != nil {
out.RawString(prefix) if !first {
x.OriginSignature.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"originSignature\":"
out.RawString(prefix)
x.OriginSignature.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"origin\":" if x.Origin != nil {
out.RawString(prefix) if !first {
x.Origin.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"origin\":"
out.RawString(prefix)
x.Origin.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -2645,26 +2921,55 @@ 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 {
x.BodySignature.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"bodySignature\":"
out.RawString(prefix)
x.BodySignature.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"metaSignature\":" if x.MetaSignature != nil {
out.RawString(prefix) if !first {
x.MetaSignature.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"metaSignature\":"
out.RawString(prefix)
x.MetaSignature.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"originSignature\":" if x.OriginSignature != nil {
out.RawString(prefix) if !first {
x.OriginSignature.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"originSignature\":"
out.RawString(prefix)
x.OriginSignature.MarshalEasyJSON(out)
}
} }
{ {
const prefix string = ",\"origin\":" if x.Origin != nil {
out.RawString(prefix) if !first {
x.Origin.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"origin\":"
out.RawString(prefix)
x.Origin.MarshalEasyJSON(out)
}
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -368,16 +368,31 @@ 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.Uint32(x.Id) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"id\":"
out.RawString(prefix)
out.Uint32(x.Id)
}
} }
{ {
const prefix string = ",\"value\":" if len(x.Value) != 0 {
out.RawString(prefix) if !first {
out.Base64Bytes(x.Value) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix)
out.Base64Bytes(x.Value)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -554,28 +569,50 @@ 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.Uint32(x.Code)
}
{
const prefix string = ",\"message\":"
out.RawString(prefix)
out.String(x.Message)
}
{
const prefix string = ",\"details\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Details {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Details[i].MarshalEasyJSON(out) const prefix string = "\"code\":"
out.RawString(prefix)
out.Uint32(x.Code)
}
}
{
if len(x.Message) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"message\":"
out.RawString(prefix)
out.String(x.Message)
}
}
{
if len(x.Details) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"details\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Details {
if i != 0 {
out.RawByte(',')
}
x.Details[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -140,28 +140,50 @@ 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.Uint64(x.ExpirationEpoch)
}
{
const prefix string = ",\"splitID\":"
out.RawString(prefix)
out.Base64Bytes(x.SplitId)
}
{
const prefix string = ",\"members\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Members {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.Members[i].MarshalEasyJSON(out) const prefix string = "\"expirationEpoch\":"
out.RawString(prefix)
out.Uint64(x.ExpirationEpoch)
}
}
{
if len(x.SplitId) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"splitID\":"
out.RawString(prefix)
out.Base64Bytes(x.SplitId)
}
}
{
if len(x.Members) != 0 {
if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"members\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.Members {
if i != 0 {
out.RawByte(',')
}
x.Members[i].MarshalEasyJSON(out)
}
out.RawByte(']')
} }
out.RawByte(']')
} }
out.RawByte('}') out.RawByte('}')
} }

View file

@ -130,11 +130,19 @@ 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.Uint32(x.InnerField) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"innerField\":"
out.RawString(prefix)
out.Uint32(x.InnerField)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -560,85 +568,184 @@ 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.Base64Bytes(x.FieldA) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldA\":"
out.RawString(prefix)
out.Base64Bytes(x.FieldA)
}
} }
{ {
const prefix string = ",\"fieldB\":" if len(x.FieldB) != 0 {
out.RawString(prefix) if !first {
out.String(x.FieldB) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldB\":"
out.RawString(prefix)
out.String(x.FieldB)
}
} }
{ {
const prefix string = ",\"fieldC\":" if x.FieldC {
out.RawString(prefix) if !first {
out.Bool(x.FieldC) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldC\":"
out.RawString(prefix)
out.Bool(x.FieldC)
}
} }
{ {
const prefix string = ",\"fieldD\":" if x.FieldD != 0 {
out.RawString(prefix) if !first {
out.Int32(x.FieldD) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldD\":"
out.RawString(prefix)
out.Int32(x.FieldD)
}
} }
{ {
const prefix string = ",\"fieldE\":" if x.FieldE != 0 {
out.RawString(prefix) if !first {
out.Uint32(x.FieldE) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldE\":"
out.RawString(prefix)
out.Uint32(x.FieldE)
}
} }
{ {
const prefix string = ",\"fieldF\":" if x.FieldF != 0 {
out.RawString(prefix) if !first {
out.Int64(x.FieldF) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldF\":"
out.RawString(prefix)
out.Int64(x.FieldF)
}
} }
{ {
const prefix string = ",\"fieldG\":" if x.FieldG != 0 {
out.RawString(prefix) if !first {
out.Uint64(x.FieldG) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldG\":"
out.RawString(prefix)
out.Uint64(x.FieldG)
}
} }
{ {
const prefix string = ",\"fieldI\":" if x.FieldI != 0 {
out.RawString(prefix) if !first {
out.Uint64(x.FieldI) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldI\":"
out.RawString(prefix)
out.Uint64(x.FieldI)
}
} }
{ {
const prefix string = ",\"fieldJ\":" if x.FieldJ != 0 {
out.RawString(prefix) if !first {
out.Float64(x.FieldJ) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldJ\":"
out.RawString(prefix)
out.Float64(x.FieldJ)
}
} }
{ {
const prefix string = ",\"fieldK\":" if x.FieldK != 0 {
out.RawString(prefix) if !first {
out.Uint32(x.FieldK) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldK\":"
out.RawString(prefix)
out.Uint32(x.FieldK)
}
} }
{ {
const prefix string = ",\"fieldH\":" if x.FieldH != 0 {
out.RawString(prefix) if !first {
v := int32(x.FieldH) out.RawByte(',')
if vv, ok := Primitives_SomeEnum_name[v]; ok { } else {
out.String(vv) first = false
} else { }
out.Int32(v) const prefix string = "\"fieldH\":"
out.RawString(prefix)
v := int32(x.FieldH)
if vv, ok := Primitives_SomeEnum_name[v]; ok {
out.String(vv)
} else {
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 {
out.RawString(prefix) if !first {
out.Base64Bytes(xx.FieldMa) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldMa\":"
out.RawString(prefix)
out.Base64Bytes(xx.FieldMa)
}
} }
case *Primitives_FieldMe: case *Primitives_FieldMe:
{ {
const prefix string = ",\"fieldMe\":" if xx.FieldMe != 0 {
out.RawString(prefix) if !first {
out.Uint32(xx.FieldMe) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldMe\":"
out.RawString(prefix)
out.Uint32(xx.FieldMe)
}
} }
case *Primitives_FieldAux: case *Primitives_FieldAux:
{ {
const prefix string = ",\"fieldAux\":" if xx.FieldAux != nil {
out.RawString(prefix) if !first {
xx.FieldAux.MarshalEasyJSON(out) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"fieldAux\":"
out.RawString(prefix)
xx.FieldAux.MarshalEasyJSON(out)
}
} }
} }
out.RawByte('}') out.RawByte('}')
@ -887,11 +994,19 @@ 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.Uint32(x.InnerField) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"innerField\":"
out.RawString(prefix)
out.Uint32(x.InnerField)
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -1169,102 +1284,159 @@ 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('[')
for i := range x.FieldA {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
out.Base64Bytes(x.FieldA[i]) const prefix string = "\"fieldA\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.FieldA {
if i != 0 {
out.RawByte(',')
}
out.Base64Bytes(x.FieldA[i])
}
out.RawByte(']')
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"fieldB\":" if len(x.FieldB) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.FieldB {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
out.String(x.FieldB[i]) const prefix string = "\"fieldB\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.FieldB {
if i != 0 {
out.RawByte(',')
}
out.String(x.FieldB[i])
}
out.RawByte(']')
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"fieldC\":" if len(x.FieldC) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.FieldC {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
out.Int32(x.FieldC[i]) const prefix string = "\"fieldC\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.FieldC {
if i != 0 {
out.RawByte(',')
}
out.Int32(x.FieldC[i])
}
out.RawByte(']')
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"fieldD\":" if len(x.FieldD) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.FieldD {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
out.Uint32(x.FieldD[i]) const prefix string = "\"fieldD\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.FieldD {
if i != 0 {
out.RawByte(',')
}
out.Uint32(x.FieldD[i])
}
out.RawByte(']')
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"fieldE\":" if len(x.FieldE) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.FieldE {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
out.Int64(x.FieldE[i]) const prefix string = "\"fieldE\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.FieldE {
if i != 0 {
out.RawByte(',')
}
out.Int64(x.FieldE[i])
}
out.RawByte(']')
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"fieldF\":" if len(x.FieldF) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.FieldF {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
out.Uint64(x.FieldF[i]) const prefix string = "\"fieldF\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.FieldF {
if i != 0 {
out.RawByte(',')
}
out.Uint64(x.FieldF[i])
}
out.RawByte(']')
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"fieldFu\":" if len(x.FieldFu) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.FieldFu {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
out.Uint64(x.FieldFu[i]) const prefix string = "\"fieldFu\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.FieldFu {
if i != 0 {
out.RawByte(',')
}
out.Uint64(x.FieldFu[i])
}
out.RawByte(']')
} }
out.RawByte(']')
} }
{ {
const prefix string = ",\"fieldAux\":" if len(x.FieldAux) != 0 {
out.RawString(prefix) if !first {
out.RawByte('[')
for i := range x.FieldAux {
if i != 0 {
out.RawByte(',') out.RawByte(',')
} else {
first = false
} }
x.FieldAux[i].MarshalEasyJSON(out) const prefix string = "\"fieldAux\":"
out.RawString(prefix)
out.RawByte('[')
for i := range x.FieldAux {
if i != 0 {
out.RawByte(',')
}
x.FieldAux[i].MarshalEasyJSON(out)
}
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('[')")