open-nomad/client/structs/structs.generated.go
2021-06-10 08:04:25 -04:00

10314 lines
210 KiB
Go

// +build codegen_generated
// Code generated by codecgen - DO NOT EDIT.
package structs
import (
"errors"
codec1978 "github.com/hashicorp/go-msgpack/codec"
pkg1_stats "github.com/hashicorp/nomad/client/stats"
pkg4_structs "github.com/hashicorp/nomad/nomad/structs"
pkg2_device "github.com/hashicorp/nomad/plugins/device"
pkg3_structs "github.com/hashicorp/nomad/plugins/shared/structs"
"runtime"
"strconv"
"time"
)
const (
// ----- content types ----
codecSelferCcUTF8102 = 1
codecSelferCcRAW102 = 255
// ----- value types used ----
codecSelferValueTypeArray102 = 10
codecSelferValueTypeMap102 = 9
codecSelferValueTypeString102 = 6
codecSelferValueTypeInt102 = 2
codecSelferValueTypeUint102 = 3
codecSelferValueTypeFloat102 = 4
codecSelferBitsize102 = uint8(32 << (^uint(0) >> 63))
)
var (
errCodecSelferOnlyMapOrArrayEncodeToStruct102 = errors.New(`only encoded map or array can be decoded into a struct`)
)
type codecSelfer102 struct{}
func init() {
if codec1978.GenVersion != 10 {
_, file, _, _ := runtime.Caller(0)
panic("codecgen version mismatch: current: 10, need " + strconv.FormatInt(int64(codec1978.GenVersion), 10) + ". Re-generate file: " + file)
}
if false {
var _ byte = 0 // reference the types, but skip this branch at build/run time
var v0 pkg1_stats.HostStats
var v1 pkg4_structs.QueryMeta
var v2 pkg2_device.DeviceGroupStats
var v3 pkg3_structs.StatValue
var v4 time.Time
_, _, _, _, _ = v0, v1, v2, v3, v4
}
}
func (x *RpcError) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(2)
} else {
r.WriteMapStart(2)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Message)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Message))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Message\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Message`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Message)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Message))
}
}
}
var yyn6 bool
if x.Code == nil {
yyn6 = true
goto LABEL6
}
LABEL6:
if yyr2 || yy2arr2 {
if yyn6 {
r.WriteArrayElem()
r.EncodeNil()
} else {
r.WriteArrayElem()
if x.Code == nil {
r.EncodeNil()
} else {
yy7 := *x.Code
if false {
} else {
r.EncodeInt(int64(yy7))
}
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Code\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Code`)
}
r.WriteMapElemValue()
if yyn6 {
r.EncodeNil()
} else {
if x.Code == nil {
r.EncodeNil()
} else {
yy9 := *x.Code
if false {
} else {
r.EncodeInt(int64(yy9))
}
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *RpcError) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *RpcError) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "Message":
if r.TryDecodeAsNil() {
x.Message = ""
} else {
x.Message = (string)(r.DecodeString())
}
case "Code":
if r.TryDecodeAsNil() {
if true && x.Code != nil {
x.Code = nil
}
} else {
if x.Code == nil {
x.Code = new(int64)
}
if false {
} else {
*x.Code = (int64)(r.DecodeInt64())
}
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *RpcError) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj7 int
var yyb7 bool
var yyhl7 bool = l >= 0
yyj7++
if yyhl7 {
yyb7 = yyj7 > l
} else {
yyb7 = r.CheckBreak()
}
if yyb7 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Message = ""
} else {
x.Message = (string)(r.DecodeString())
}
yyj7++
if yyhl7 {
yyb7 = yyj7 > l
} else {
yyb7 = r.CheckBreak()
}
if yyb7 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
if true && x.Code != nil {
x.Code = nil
}
} else {
if x.Code == nil {
x.Code = new(int64)
}
if false {
} else {
*x.Code = (int64)(r.DecodeInt64())
}
}
for {
yyj7++
if yyhl7 {
yyb7 = yyj7 > l
} else {
yyb7 = r.CheckBreak()
}
if yyb7 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj7-1, "")
}
r.ReadArrayEnd()
}
func (x *ClientStatsResponse) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(4)
} else {
r.WriteMapStart(4)
}
var yyn3 bool
if x.HostStats == nil {
yyn3 = true
goto LABEL3
}
LABEL3:
if yyr2 || yy2arr2 {
if yyn3 {
r.WriteArrayElem()
r.EncodeNil()
} else {
r.WriteArrayElem()
if x.HostStats == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt4 := z.Extension(z.I2Rtid(x.HostStats)); yyxt4 != nil {
z.EncExtension(x.HostStats, yyxt4)
} else {
z.EncFallback(x.HostStats)
}
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"HostStats\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `HostStats`)
}
r.WriteMapElemValue()
if yyn3 {
r.EncodeNil()
} else {
if x.HostStats == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt5 := z.Extension(z.I2Rtid(x.HostStats)); yyxt5 != nil {
z.EncExtension(x.HostStats, yyxt5)
} else {
z.EncFallback(x.HostStats)
}
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.Index))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Index\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Index`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.Index))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil {
z.EncExtension(x.LastContact, yyxt10)
} else {
r.EncodeInt(int64(x.LastContact))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"LastContact\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `LastContact`)
}
r.WriteMapElemValue()
if false {
} else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil {
z.EncExtension(x.LastContact, yyxt11)
} else {
r.EncodeInt(int64(x.LastContact))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.KnownLeader))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"KnownLeader\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `KnownLeader`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.KnownLeader))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *ClientStatsResponse) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *ClientStatsResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "HostStats":
if r.TryDecodeAsNil() {
if true && x.HostStats != nil {
x.HostStats = nil
}
} else {
if x.HostStats == nil {
x.HostStats = new(pkg1_stats.HostStats)
}
if false {
} else if yyxt5 := z.Extension(z.I2Rtid(x.HostStats)); yyxt5 != nil {
z.DecExtension(x.HostStats, yyxt5)
} else {
z.DecFallback(x.HostStats, false)
}
}
case "Index":
if r.TryDecodeAsNil() {
x.QueryMeta.Index = 0
} else {
x.Index = (uint64)(r.DecodeUint64())
}
case "LastContact":
if r.TryDecodeAsNil() {
x.QueryMeta.LastContact = 0
} else {
if false {
} else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil {
z.DecExtension(x.LastContact, yyxt8)
} else {
x.LastContact = (time.Duration)(r.DecodeInt64())
}
}
case "KnownLeader":
if r.TryDecodeAsNil() {
x.QueryMeta.KnownLeader = false
} else {
x.KnownLeader = (bool)(r.DecodeBool())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *ClientStatsResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj10 int
var yyb10 bool
var yyhl10 bool = l >= 0
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb10 = r.CheckBreak()
}
if yyb10 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
if true && x.HostStats != nil {
x.HostStats = nil
}
} else {
if x.HostStats == nil {
x.HostStats = new(pkg1_stats.HostStats)
}
if false {
} else if yyxt12 := z.Extension(z.I2Rtid(x.HostStats)); yyxt12 != nil {
z.DecExtension(x.HostStats, yyxt12)
} else {
z.DecFallback(x.HostStats, false)
}
}
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb10 = r.CheckBreak()
}
if yyb10 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryMeta.Index = 0
} else {
x.Index = (uint64)(r.DecodeUint64())
}
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb10 = r.CheckBreak()
}
if yyb10 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryMeta.LastContact = 0
} else {
if false {
} else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil {
z.DecExtension(x.LastContact, yyxt15)
} else {
x.LastContact = (time.Duration)(r.DecodeInt64())
}
}
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb10 = r.CheckBreak()
}
if yyb10 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryMeta.KnownLeader = false
} else {
x.KnownLeader = (bool)(r.DecodeBool())
}
for {
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb10 = r.CheckBreak()
}
if yyb10 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj10-1, "")
}
r.ReadArrayEnd()
}
func (x *MonitorRequest) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(15)
} else {
r.WriteMapStart(15)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.LogLevel)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.LogLevel))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"LogLevel\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `LogLevel`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.LogLevel)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.LogLevel))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.LogJSON))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"LogJSON\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `LogJSON`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.LogJSON))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NodeID))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"NodeID\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `NodeID`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NodeID))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.ServerID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.ServerID))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"ServerID\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `ServerID`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.ServerID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.ServerID))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.PlainText))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"PlainText\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `PlainText`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.PlainText))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Region\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Region`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Namespace\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MinQueryIndex\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if yyxt28 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt28 != nil {
z.EncExtension(x.MaxQueryTime, yyxt28)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MaxQueryTime\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`)
}
r.WriteMapElemValue()
if false {
} else if yyxt29 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt29 != nil {
z.EncExtension(x.MaxQueryTime, yyxt29)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllowStale\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Prefix\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AuthToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"PerPage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"NextToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Forwarded\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *MonitorRequest) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *MonitorRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "LogLevel":
if r.TryDecodeAsNil() {
x.LogLevel = ""
} else {
x.LogLevel = (string)(r.DecodeString())
}
case "LogJSON":
if r.TryDecodeAsNil() {
x.LogJSON = false
} else {
x.LogJSON = (bool)(r.DecodeBool())
}
case "NodeID":
if r.TryDecodeAsNil() {
x.NodeID = ""
} else {
x.NodeID = (string)(r.DecodeString())
}
case "ServerID":
if r.TryDecodeAsNil() {
x.ServerID = ""
} else {
x.ServerID = (string)(r.DecodeString())
}
case "PlainText":
if r.TryDecodeAsNil() {
x.PlainText = false
} else {
x.PlainText = (bool)(r.DecodeBool())
}
case "Region":
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
case "Namespace":
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
case "MinQueryIndex":
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
case "MaxQueryTime":
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil {
z.DecExtension(x.MaxQueryTime, yyxt13)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
case "AllowStale":
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
case "Prefix":
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
case "AuthToken":
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
case "PerPage":
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
case "NextToken":
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
case "Forwarded":
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *MonitorRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj20 int
var yyb20 bool
var yyhl20 bool = l >= 0
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.LogLevel = ""
} else {
x.LogLevel = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.LogJSON = false
} else {
x.LogJSON = (bool)(r.DecodeBool())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.NodeID = ""
} else {
x.NodeID = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.ServerID = ""
} else {
x.ServerID = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.PlainText = false
} else {
x.PlainText = (bool)(r.DecodeBool())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt30 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt30 != nil {
z.DecExtension(x.MaxQueryTime, yyxt30)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
for {
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj20-1, "")
}
r.ReadArrayEnd()
}
func (x *AllocFileInfo) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(6)
} else {
r.WriteMapStart(6)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Name)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Name))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Name\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Name`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Name)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Name))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.IsDir))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"IsDir\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `IsDir`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.IsDir))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.Size))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Size\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Size`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.Size))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.FileMode)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.FileMode))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"FileMode\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `FileMode`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.FileMode)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.FileMode))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if !z.EncBasicHandle().TimeNotBuiltin {
r.EncodeTime(x.ModTime)
} else if yyxt16 := z.Extension(z.I2Rtid(x.ModTime)); yyxt16 != nil {
z.EncExtension(x.ModTime, yyxt16)
} else if z.EncBinary() {
z.EncBinaryMarshal(x.ModTime)
} else if !z.EncBinary() && z.IsJSONHandle() {
z.EncJSONMarshal(x.ModTime)
} else {
z.EncFallback(x.ModTime)
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"ModTime\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `ModTime`)
}
r.WriteMapElemValue()
if false {
} else if !z.EncBasicHandle().TimeNotBuiltin {
r.EncodeTime(x.ModTime)
} else if yyxt17 := z.Extension(z.I2Rtid(x.ModTime)); yyxt17 != nil {
z.EncExtension(x.ModTime, yyxt17)
} else if z.EncBinary() {
z.EncBinaryMarshal(x.ModTime)
} else if !z.EncBinary() && z.IsJSONHandle() {
z.EncJSONMarshal(x.ModTime)
} else {
z.EncFallback(x.ModTime)
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.ContentType)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.ContentType))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"ContentType\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `ContentType`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.ContentType)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.ContentType))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *AllocFileInfo) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *AllocFileInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "Name":
if r.TryDecodeAsNil() {
x.Name = ""
} else {
x.Name = (string)(r.DecodeString())
}
case "IsDir":
if r.TryDecodeAsNil() {
x.IsDir = false
} else {
x.IsDir = (bool)(r.DecodeBool())
}
case "Size":
if r.TryDecodeAsNil() {
x.Size = 0
} else {
x.Size = (int64)(r.DecodeInt64())
}
case "FileMode":
if r.TryDecodeAsNil() {
x.FileMode = ""
} else {
x.FileMode = (string)(r.DecodeString())
}
case "ModTime":
if r.TryDecodeAsNil() {
x.ModTime = time.Time{}
} else {
if false {
} else if !z.DecBasicHandle().TimeNotBuiltin {
x.ModTime = r.DecodeTime()
} else if yyxt9 := z.Extension(z.I2Rtid(x.ModTime)); yyxt9 != nil {
z.DecExtension(x.ModTime, yyxt9)
} else if z.DecBinary() {
z.DecBinaryUnmarshal(&x.ModTime)
} else if !z.DecBinary() && z.IsJSONHandle() {
z.DecJSONUnmarshal(&x.ModTime)
} else {
z.DecFallback(&x.ModTime, false)
}
}
case "ContentType":
if r.TryDecodeAsNil() {
x.ContentType = ""
} else {
x.ContentType = (string)(r.DecodeString())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *AllocFileInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj11 int
var yyb11 bool
var yyhl11 bool = l >= 0
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
} else {
yyb11 = r.CheckBreak()
}
if yyb11 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Name = ""
} else {
x.Name = (string)(r.DecodeString())
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
} else {
yyb11 = r.CheckBreak()
}
if yyb11 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.IsDir = false
} else {
x.IsDir = (bool)(r.DecodeBool())
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
} else {
yyb11 = r.CheckBreak()
}
if yyb11 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Size = 0
} else {
x.Size = (int64)(r.DecodeInt64())
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
} else {
yyb11 = r.CheckBreak()
}
if yyb11 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.FileMode = ""
} else {
x.FileMode = (string)(r.DecodeString())
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
} else {
yyb11 = r.CheckBreak()
}
if yyb11 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.ModTime = time.Time{}
} else {
if false {
} else if !z.DecBasicHandle().TimeNotBuiltin {
x.ModTime = r.DecodeTime()
} else if yyxt17 := z.Extension(z.I2Rtid(x.ModTime)); yyxt17 != nil {
z.DecExtension(x.ModTime, yyxt17)
} else if z.DecBinary() {
z.DecBinaryUnmarshal(&x.ModTime)
} else if !z.DecBinary() && z.IsJSONHandle() {
z.DecJSONUnmarshal(&x.ModTime)
} else {
z.DecFallback(&x.ModTime, false)
}
}
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
} else {
yyb11 = r.CheckBreak()
}
if yyb11 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.ContentType = ""
} else {
x.ContentType = (string)(r.DecodeString())
}
for {
yyj11++
if yyhl11 {
yyb11 = yyj11 > l
} else {
yyb11 = r.CheckBreak()
}
if yyb11 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj11-1, "")
}
r.ReadArrayEnd()
}
func (x *FsListRequest) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(12)
} else {
r.WriteMapStart(12)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllocID\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllocID`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Path)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Path))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Path\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Path`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Path)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Path))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Region\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Region`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Namespace\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MinQueryIndex\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if yyxt19 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt19 != nil {
z.EncExtension(x.MaxQueryTime, yyxt19)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MaxQueryTime\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`)
}
r.WriteMapElemValue()
if false {
} else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil {
z.EncExtension(x.MaxQueryTime, yyxt20)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllowStale\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Prefix\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AuthToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"PerPage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"NextToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Forwarded\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *FsListRequest) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *FsListRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "AllocID":
if r.TryDecodeAsNil() {
x.AllocID = ""
} else {
x.AllocID = (string)(r.DecodeString())
}
case "Path":
if r.TryDecodeAsNil() {
x.Path = ""
} else {
x.Path = (string)(r.DecodeString())
}
case "Region":
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
case "Namespace":
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
case "MinQueryIndex":
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
case "MaxQueryTime":
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil {
z.DecExtension(x.MaxQueryTime, yyxt10)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
case "AllowStale":
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
case "Prefix":
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
case "AuthToken":
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
case "PerPage":
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
case "NextToken":
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
case "Forwarded":
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *FsListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj17 int
var yyb17 bool
var yyhl17 bool = l >= 0
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.AllocID = ""
} else {
x.AllocID = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Path = ""
} else {
x.Path = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil {
z.DecExtension(x.MaxQueryTime, yyxt24)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
for {
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj17-1, "")
}
r.ReadArrayEnd()
}
func (x *FsListResponse) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(4)
} else {
r.WriteMapStart(4)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if x.Files == nil {
r.EncodeNil()
} else {
if false {
} else {
h.encSlicePtrtoAllocFileInfo(([]*AllocFileInfo)(x.Files), e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Files\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Files`)
}
r.WriteMapElemValue()
if x.Files == nil {
r.EncodeNil()
} else {
if false {
} else {
h.encSlicePtrtoAllocFileInfo(([]*AllocFileInfo)(x.Files), e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.Index))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Index\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Index`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.Index))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil {
z.EncExtension(x.LastContact, yyxt10)
} else {
r.EncodeInt(int64(x.LastContact))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"LastContact\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `LastContact`)
}
r.WriteMapElemValue()
if false {
} else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil {
z.EncExtension(x.LastContact, yyxt11)
} else {
r.EncodeInt(int64(x.LastContact))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.KnownLeader))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"KnownLeader\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `KnownLeader`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.KnownLeader))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *FsListResponse) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *FsListResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "Files":
if r.TryDecodeAsNil() {
x.Files = nil
} else {
if false {
} else {
h.decSlicePtrtoAllocFileInfo((*[]*AllocFileInfo)(&x.Files), d)
}
}
case "Index":
if r.TryDecodeAsNil() {
x.QueryMeta.Index = 0
} else {
x.Index = (uint64)(r.DecodeUint64())
}
case "LastContact":
if r.TryDecodeAsNil() {
x.QueryMeta.LastContact = 0
} else {
if false {
} else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil {
z.DecExtension(x.LastContact, yyxt8)
} else {
x.LastContact = (time.Duration)(r.DecodeInt64())
}
}
case "KnownLeader":
if r.TryDecodeAsNil() {
x.QueryMeta.KnownLeader = false
} else {
x.KnownLeader = (bool)(r.DecodeBool())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *FsListResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj10 int
var yyb10 bool
var yyhl10 bool = l >= 0
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb10 = r.CheckBreak()
}
if yyb10 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Files = nil
} else {
if false {
} else {
h.decSlicePtrtoAllocFileInfo((*[]*AllocFileInfo)(&x.Files), d)
}
}
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb10 = r.CheckBreak()
}
if yyb10 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryMeta.Index = 0
} else {
x.Index = (uint64)(r.DecodeUint64())
}
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb10 = r.CheckBreak()
}
if yyb10 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryMeta.LastContact = 0
} else {
if false {
} else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil {
z.DecExtension(x.LastContact, yyxt15)
} else {
x.LastContact = (time.Duration)(r.DecodeInt64())
}
}
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb10 = r.CheckBreak()
}
if yyb10 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryMeta.KnownLeader = false
} else {
x.KnownLeader = (bool)(r.DecodeBool())
}
for {
yyj10++
if yyhl10 {
yyb10 = yyj10 > l
} else {
yyb10 = r.CheckBreak()
}
if yyb10 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj10-1, "")
}
r.ReadArrayEnd()
}
func (x *FsStatRequest) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(12)
} else {
r.WriteMapStart(12)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllocID\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllocID`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Path)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Path))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Path\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Path`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Path)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Path))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Region\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Region`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Namespace\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MinQueryIndex\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if yyxt19 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt19 != nil {
z.EncExtension(x.MaxQueryTime, yyxt19)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MaxQueryTime\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`)
}
r.WriteMapElemValue()
if false {
} else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil {
z.EncExtension(x.MaxQueryTime, yyxt20)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllowStale\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Prefix\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AuthToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"PerPage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"NextToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Forwarded\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *FsStatRequest) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *FsStatRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "AllocID":
if r.TryDecodeAsNil() {
x.AllocID = ""
} else {
x.AllocID = (string)(r.DecodeString())
}
case "Path":
if r.TryDecodeAsNil() {
x.Path = ""
} else {
x.Path = (string)(r.DecodeString())
}
case "Region":
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
case "Namespace":
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
case "MinQueryIndex":
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
case "MaxQueryTime":
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil {
z.DecExtension(x.MaxQueryTime, yyxt10)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
case "AllowStale":
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
case "Prefix":
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
case "AuthToken":
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
case "PerPage":
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
case "NextToken":
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
case "Forwarded":
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *FsStatRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj17 int
var yyb17 bool
var yyhl17 bool = l >= 0
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.AllocID = ""
} else {
x.AllocID = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Path = ""
} else {
x.Path = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil {
z.DecExtension(x.MaxQueryTime, yyxt24)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
for {
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj17-1, "")
}
r.ReadArrayEnd()
}
func (x *FsStatResponse) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(4)
} else {
r.WriteMapStart(4)
}
var yyn3 bool
if x.Info == nil {
yyn3 = true
goto LABEL3
}
LABEL3:
if yyr2 || yy2arr2 {
if yyn3 {
r.WriteArrayElem()
r.EncodeNil()
} else {
r.WriteArrayElem()
if x.Info == nil {
r.EncodeNil()
} else {
x.Info.CodecEncodeSelf(e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Info\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Info`)
}
r.WriteMapElemValue()
if yyn3 {
r.EncodeNil()
} else {
if x.Info == nil {
r.EncodeNil()
} else {
x.Info.CodecEncodeSelf(e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.Index))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Index\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Index`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.Index))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil {
z.EncExtension(x.LastContact, yyxt10)
} else {
r.EncodeInt(int64(x.LastContact))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"LastContact\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `LastContact`)
}
r.WriteMapElemValue()
if false {
} else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil {
z.EncExtension(x.LastContact, yyxt11)
} else {
r.EncodeInt(int64(x.LastContact))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.KnownLeader))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"KnownLeader\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `KnownLeader`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.KnownLeader))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *FsStatResponse) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *FsStatResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "Info":
if r.TryDecodeAsNil() {
if true && x.Info != nil {
x.Info = nil
}
} else {
if x.Info == nil {
x.Info = new(AllocFileInfo)
}
x.Info.CodecDecodeSelf(d)
}
case "Index":
if r.TryDecodeAsNil() {
x.QueryMeta.Index = 0
} else {
x.Index = (uint64)(r.DecodeUint64())
}
case "LastContact":
if r.TryDecodeAsNil() {
x.QueryMeta.LastContact = 0
} else {
if false {
} else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil {
z.DecExtension(x.LastContact, yyxt7)
} else {
x.LastContact = (time.Duration)(r.DecodeInt64())
}
}
case "KnownLeader":
if r.TryDecodeAsNil() {
x.QueryMeta.KnownLeader = false
} else {
x.KnownLeader = (bool)(r.DecodeBool())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *FsStatResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj9 int
var yyb9 bool
var yyhl9 bool = l >= 0
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb9 = r.CheckBreak()
}
if yyb9 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
if true && x.Info != nil {
x.Info = nil
}
} else {
if x.Info == nil {
x.Info = new(AllocFileInfo)
}
x.Info.CodecDecodeSelf(d)
}
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb9 = r.CheckBreak()
}
if yyb9 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryMeta.Index = 0
} else {
x.Index = (uint64)(r.DecodeUint64())
}
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb9 = r.CheckBreak()
}
if yyb9 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryMeta.LastContact = 0
} else {
if false {
} else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil {
z.DecExtension(x.LastContact, yyxt13)
} else {
x.LastContact = (time.Duration)(r.DecodeInt64())
}
}
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb9 = r.CheckBreak()
}
if yyb9 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryMeta.KnownLeader = false
} else {
x.KnownLeader = (bool)(r.DecodeBool())
}
for {
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb9 = r.CheckBreak()
}
if yyb9 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj9-1, "")
}
r.ReadArrayEnd()
}
func (x *FsStreamRequest) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(17)
} else {
r.WriteMapStart(17)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllocID\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllocID`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Path)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Path))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Path\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Path`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Path)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Path))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.Offset))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Offset\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Offset`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.Offset))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Origin)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Origin))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Origin\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Origin`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Origin)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Origin))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.PlainText))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"PlainText\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `PlainText`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.PlainText))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.Limit))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Limit\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Limit`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.Limit))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.Follow))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Follow\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Follow`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.Follow))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Region\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Region`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Namespace\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MinQueryIndex\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if yyxt34 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt34 != nil {
z.EncExtension(x.MaxQueryTime, yyxt34)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MaxQueryTime\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`)
}
r.WriteMapElemValue()
if false {
} else if yyxt35 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt35 != nil {
z.EncExtension(x.MaxQueryTime, yyxt35)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllowStale\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Prefix\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AuthToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"PerPage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"NextToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Forwarded\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *FsStreamRequest) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *FsStreamRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "AllocID":
if r.TryDecodeAsNil() {
x.AllocID = ""
} else {
x.AllocID = (string)(r.DecodeString())
}
case "Path":
if r.TryDecodeAsNil() {
x.Path = ""
} else {
x.Path = (string)(r.DecodeString())
}
case "Offset":
if r.TryDecodeAsNil() {
x.Offset = 0
} else {
x.Offset = (int64)(r.DecodeInt64())
}
case "Origin":
if r.TryDecodeAsNil() {
x.Origin = ""
} else {
x.Origin = (string)(r.DecodeString())
}
case "PlainText":
if r.TryDecodeAsNil() {
x.PlainText = false
} else {
x.PlainText = (bool)(r.DecodeBool())
}
case "Limit":
if r.TryDecodeAsNil() {
x.Limit = 0
} else {
x.Limit = (int64)(r.DecodeInt64())
}
case "Follow":
if r.TryDecodeAsNil() {
x.Follow = false
} else {
x.Follow = (bool)(r.DecodeBool())
}
case "Region":
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
case "Namespace":
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
case "MinQueryIndex":
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
case "MaxQueryTime":
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt15 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt15 != nil {
z.DecExtension(x.MaxQueryTime, yyxt15)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
case "AllowStale":
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
case "Prefix":
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
case "AuthToken":
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
case "PerPage":
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
case "NextToken":
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
case "Forwarded":
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *FsStreamRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj22 int
var yyb22 bool
var yyhl22 bool = l >= 0
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.AllocID = ""
} else {
x.AllocID = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Path = ""
} else {
x.Path = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Offset = 0
} else {
x.Offset = (int64)(r.DecodeInt64())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Origin = ""
} else {
x.Origin = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.PlainText = false
} else {
x.PlainText = (bool)(r.DecodeBool())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Limit = 0
} else {
x.Limit = (int64)(r.DecodeInt64())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Follow = false
} else {
x.Follow = (bool)(r.DecodeBool())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt34 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt34 != nil {
z.DecExtension(x.MaxQueryTime, yyxt34)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
for {
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj22-1, "")
}
r.ReadArrayEnd()
}
func (x *FsLogsRequest) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(17)
} else {
r.WriteMapStart(17)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllocID\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllocID`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Task)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Task))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Task\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Task`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Task)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Task))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.LogType)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.LogType))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"LogType\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `LogType`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.LogType)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.LogType))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.Offset))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Offset\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Offset`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.Offset))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Origin)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Origin))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Origin\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Origin`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Origin)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Origin))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.PlainText))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"PlainText\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `PlainText`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.PlainText))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.Follow))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Follow\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Follow`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.Follow))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Region\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Region`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Namespace\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MinQueryIndex\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if yyxt34 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt34 != nil {
z.EncExtension(x.MaxQueryTime, yyxt34)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MaxQueryTime\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`)
}
r.WriteMapElemValue()
if false {
} else if yyxt35 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt35 != nil {
z.EncExtension(x.MaxQueryTime, yyxt35)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllowStale\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Prefix\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AuthToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"PerPage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"NextToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Forwarded\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *FsLogsRequest) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *FsLogsRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "AllocID":
if r.TryDecodeAsNil() {
x.AllocID = ""
} else {
x.AllocID = (string)(r.DecodeString())
}
case "Task":
if r.TryDecodeAsNil() {
x.Task = ""
} else {
x.Task = (string)(r.DecodeString())
}
case "LogType":
if r.TryDecodeAsNil() {
x.LogType = ""
} else {
x.LogType = (string)(r.DecodeString())
}
case "Offset":
if r.TryDecodeAsNil() {
x.Offset = 0
} else {
x.Offset = (int64)(r.DecodeInt64())
}
case "Origin":
if r.TryDecodeAsNil() {
x.Origin = ""
} else {
x.Origin = (string)(r.DecodeString())
}
case "PlainText":
if r.TryDecodeAsNil() {
x.PlainText = false
} else {
x.PlainText = (bool)(r.DecodeBool())
}
case "Follow":
if r.TryDecodeAsNil() {
x.Follow = false
} else {
x.Follow = (bool)(r.DecodeBool())
}
case "Region":
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
case "Namespace":
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
case "MinQueryIndex":
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
case "MaxQueryTime":
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt15 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt15 != nil {
z.DecExtension(x.MaxQueryTime, yyxt15)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
case "AllowStale":
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
case "Prefix":
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
case "AuthToken":
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
case "PerPage":
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
case "NextToken":
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
case "Forwarded":
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *FsLogsRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj22 int
var yyb22 bool
var yyhl22 bool = l >= 0
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.AllocID = ""
} else {
x.AllocID = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Task = ""
} else {
x.Task = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.LogType = ""
} else {
x.LogType = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Offset = 0
} else {
x.Offset = (int64)(r.DecodeInt64())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Origin = ""
} else {
x.Origin = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.PlainText = false
} else {
x.PlainText = (bool)(r.DecodeBool())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Follow = false
} else {
x.Follow = (bool)(r.DecodeBool())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt34 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt34 != nil {
z.DecExtension(x.MaxQueryTime, yyxt34)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
for {
yyj22++
if yyhl22 {
yyb22 = yyj22 > l
} else {
yyb22 = r.CheckBreak()
}
if yyb22 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj22-1, "")
}
r.ReadArrayEnd()
}
func (x *StreamErrWrapper) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(2)
} else {
r.WriteMapStart(2)
}
var yyn3 bool
if x.Error == nil {
yyn3 = true
goto LABEL3
}
LABEL3:
if yyr2 || yy2arr2 {
if yyn3 {
r.WriteArrayElem()
r.EncodeNil()
} else {
r.WriteArrayElem()
if x.Error == nil {
r.EncodeNil()
} else {
x.Error.CodecEncodeSelf(e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Error\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Error`)
}
r.WriteMapElemValue()
if yyn3 {
r.EncodeNil()
} else {
if x.Error == nil {
r.EncodeNil()
} else {
x.Error.CodecEncodeSelf(e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if x.Payload == nil {
r.EncodeNil()
} else {
if false {
} else {
r.EncodeStringBytesRaw([]byte(x.Payload))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Payload\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Payload`)
}
r.WriteMapElemValue()
if x.Payload == nil {
r.EncodeNil()
} else {
if false {
} else {
r.EncodeStringBytesRaw([]byte(x.Payload))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *StreamErrWrapper) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *StreamErrWrapper) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "Error":
if r.TryDecodeAsNil() {
if true && x.Error != nil {
x.Error = nil
}
} else {
if x.Error == nil {
x.Error = new(RpcError)
}
x.Error.CodecDecodeSelf(d)
}
case "Payload":
if r.TryDecodeAsNil() {
x.Payload = nil
} else {
if false {
} else {
x.Payload = r.DecodeBytes(([]byte)(x.Payload), false)
}
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *StreamErrWrapper) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj7 int
var yyb7 bool
var yyhl7 bool = l >= 0
yyj7++
if yyhl7 {
yyb7 = yyj7 > l
} else {
yyb7 = r.CheckBreak()
}
if yyb7 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
if true && x.Error != nil {
x.Error = nil
}
} else {
if x.Error == nil {
x.Error = new(RpcError)
}
x.Error.CodecDecodeSelf(d)
}
yyj7++
if yyhl7 {
yyb7 = yyj7 > l
} else {
yyb7 = r.CheckBreak()
}
if yyb7 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Payload = nil
} else {
if false {
} else {
x.Payload = r.DecodeBytes(([]byte)(x.Payload), false)
}
}
for {
yyj7++
if yyhl7 {
yyb7 = yyj7 > l
} else {
yyb7 = r.CheckBreak()
}
if yyb7 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj7-1, "")
}
r.ReadArrayEnd()
}
func (x *AllocExecRequest) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(14)
} else {
r.WriteMapStart(14)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllocID\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllocID`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Task)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Task))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Task\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Task`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Task)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Task))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.Tty))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Tty\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Tty`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.Tty))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if x.Cmd == nil {
r.EncodeNil()
} else {
if false {
} else {
z.F.EncSliceStringV(x.Cmd, e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Cmd\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Cmd`)
}
r.WriteMapElemValue()
if x.Cmd == nil {
r.EncodeNil()
} else {
if false {
} else {
z.F.EncSliceStringV(x.Cmd, e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Region\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Region`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Namespace\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MinQueryIndex\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if yyxt25 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt25 != nil {
z.EncExtension(x.MaxQueryTime, yyxt25)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MaxQueryTime\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`)
}
r.WriteMapElemValue()
if false {
} else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil {
z.EncExtension(x.MaxQueryTime, yyxt26)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllowStale\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Prefix\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AuthToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"PerPage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"NextToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Forwarded\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *AllocExecRequest) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *AllocExecRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "AllocID":
if r.TryDecodeAsNil() {
x.AllocID = ""
} else {
x.AllocID = (string)(r.DecodeString())
}
case "Task":
if r.TryDecodeAsNil() {
x.Task = ""
} else {
x.Task = (string)(r.DecodeString())
}
case "Tty":
if r.TryDecodeAsNil() {
x.Tty = false
} else {
x.Tty = (bool)(r.DecodeBool())
}
case "Cmd":
if r.TryDecodeAsNil() {
x.Cmd = nil
} else {
if false {
} else {
z.F.DecSliceStringX(&x.Cmd, d)
}
}
case "Region":
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
case "Namespace":
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
case "MinQueryIndex":
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
case "MaxQueryTime":
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil {
z.DecExtension(x.MaxQueryTime, yyxt13)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
case "AllowStale":
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
case "Prefix":
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
case "AuthToken":
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
case "PerPage":
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
case "NextToken":
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
case "Forwarded":
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *AllocExecRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj20 int
var yyb20 bool
var yyhl20 bool = l >= 0
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.AllocID = ""
} else {
x.AllocID = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Task = ""
} else {
x.Task = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Tty = false
} else {
x.Tty = (bool)(r.DecodeBool())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Cmd = nil
} else {
if false {
} else {
z.F.DecSliceStringX(&x.Cmd, d)
}
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt30 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt30 != nil {
z.DecExtension(x.MaxQueryTime, yyxt30)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
for {
yyj20++
if yyhl20 {
yyb20 = yyj20 > l
} else {
yyb20 = r.CheckBreak()
}
if yyb20 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj20-1, "")
}
r.ReadArrayEnd()
}
func (x *AllocStatsRequest) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(12)
} else {
r.WriteMapStart(12)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllocID\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllocID`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Task)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Task))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Task\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Task`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Task)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Task))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Region\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Region`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Region)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Namespace\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MinQueryIndex\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.MinQueryIndex))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if yyxt19 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt19 != nil {
z.EncExtension(x.MaxQueryTime, yyxt19)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MaxQueryTime\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`)
}
r.WriteMapElemValue()
if false {
} else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil {
z.EncExtension(x.MaxQueryTime, yyxt20)
} else {
r.EncodeInt(int64(x.MaxQueryTime))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AllowStale\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.AllowStale))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Prefix\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"AuthToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"PerPage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `PerPage`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.PerPage))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"NextToken\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `NextToken`)
}
r.WriteMapElemValue()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(x.NextToken)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NextToken))
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Forwarded\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.Forwarded))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *AllocStatsRequest) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *AllocStatsRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "AllocID":
if r.TryDecodeAsNil() {
x.AllocID = ""
} else {
x.AllocID = (string)(r.DecodeString())
}
case "Task":
if r.TryDecodeAsNil() {
x.Task = ""
} else {
x.Task = (string)(r.DecodeString())
}
case "Region":
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
case "Namespace":
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
case "MinQueryIndex":
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
case "MaxQueryTime":
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil {
z.DecExtension(x.MaxQueryTime, yyxt10)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
case "AllowStale":
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
case "Prefix":
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
case "AuthToken":
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
case "PerPage":
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
case "NextToken":
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
case "Forwarded":
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *AllocStatsRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj17 int
var yyb17 bool
var yyhl17 bool = l >= 0
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.AllocID = ""
} else {
x.AllocID = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Task = ""
} else {
x.Task = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Region = ""
} else {
x.Region = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Namespace = ""
} else {
x.Namespace = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MinQueryIndex = 0
} else {
x.MinQueryIndex = (uint64)(r.DecodeUint64())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.MaxQueryTime = 0
} else {
if false {
} else if yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil {
z.DecExtension(x.MaxQueryTime, yyxt24)
} else {
x.MaxQueryTime = (time.Duration)(r.DecodeInt64())
}
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AllowStale = false
} else {
x.AllowStale = (bool)(r.DecodeBool())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.Prefix = ""
} else {
x.Prefix = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.AuthToken = ""
} else {
x.AuthToken = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.PerPage = 0
} else {
x.PerPage = (int32)(z.C.IntV(r.DecodeInt64(), 32))
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.NextToken = ""
} else {
x.NextToken = (string)(r.DecodeString())
}
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryOptions.InternalRpcInfo.Forwarded = false
} else {
x.Forwarded = (bool)(r.DecodeBool())
}
for {
yyj17++
if yyhl17 {
yyb17 = yyj17 > l
} else {
yyb17 = r.CheckBreak()
}
if yyb17 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj17-1, "")
}
r.ReadArrayEnd()
}
func (x *AllocStatsResponse) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(4)
} else {
r.WriteMapStart(4)
}
var yyn3 bool
if x.Stats == nil {
yyn3 = true
goto LABEL3
}
LABEL3:
if yyr2 || yy2arr2 {
if yyn3 {
r.WriteArrayElem()
r.EncodeNil()
} else {
r.WriteArrayElem()
if x.Stats == nil {
r.EncodeNil()
} else {
x.Stats.CodecEncodeSelf(e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Stats\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Stats`)
}
r.WriteMapElemValue()
if yyn3 {
r.EncodeNil()
} else {
if x.Stats == nil {
r.EncodeNil()
} else {
x.Stats.CodecEncodeSelf(e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.Index))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Index\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Index`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.Index))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil {
z.EncExtension(x.LastContact, yyxt10)
} else {
r.EncodeInt(int64(x.LastContact))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"LastContact\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `LastContact`)
}
r.WriteMapElemValue()
if false {
} else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil {
z.EncExtension(x.LastContact, yyxt11)
} else {
r.EncodeInt(int64(x.LastContact))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.KnownLeader))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"KnownLeader\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `KnownLeader`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.KnownLeader))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *AllocStatsResponse) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *AllocStatsResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "Stats":
if r.TryDecodeAsNil() {
if true && x.Stats != nil {
x.Stats = nil
}
} else {
if x.Stats == nil {
x.Stats = new(AllocResourceUsage)
}
x.Stats.CodecDecodeSelf(d)
}
case "Index":
if r.TryDecodeAsNil() {
x.QueryMeta.Index = 0
} else {
x.Index = (uint64)(r.DecodeUint64())
}
case "LastContact":
if r.TryDecodeAsNil() {
x.QueryMeta.LastContact = 0
} else {
if false {
} else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil {
z.DecExtension(x.LastContact, yyxt7)
} else {
x.LastContact = (time.Duration)(r.DecodeInt64())
}
}
case "KnownLeader":
if r.TryDecodeAsNil() {
x.QueryMeta.KnownLeader = false
} else {
x.KnownLeader = (bool)(r.DecodeBool())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *AllocStatsResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj9 int
var yyb9 bool
var yyhl9 bool = l >= 0
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb9 = r.CheckBreak()
}
if yyb9 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
if true && x.Stats != nil {
x.Stats = nil
}
} else {
if x.Stats == nil {
x.Stats = new(AllocResourceUsage)
}
x.Stats.CodecDecodeSelf(d)
}
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb9 = r.CheckBreak()
}
if yyb9 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryMeta.Index = 0
} else {
x.Index = (uint64)(r.DecodeUint64())
}
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb9 = r.CheckBreak()
}
if yyb9 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryMeta.LastContact = 0
} else {
if false {
} else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil {
z.DecExtension(x.LastContact, yyxt13)
} else {
x.LastContact = (time.Duration)(r.DecodeInt64())
}
}
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb9 = r.CheckBreak()
}
if yyb9 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.QueryMeta.KnownLeader = false
} else {
x.KnownLeader = (bool)(r.DecodeBool())
}
for {
yyj9++
if yyhl9 {
yyb9 = yyj9 > l
} else {
yyb9 = r.CheckBreak()
}
if yyb9 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj9-1, "")
}
r.ReadArrayEnd()
}
func (x *MemoryStats) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(8)
} else {
r.WriteMapStart(8)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.RSS))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"RSS\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `RSS`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.RSS))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.Cache))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Cache\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Cache`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.Cache))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.Swap))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Swap\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Swap`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.Swap))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.Usage))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Usage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Usage`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.Usage))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.MaxUsage))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MaxUsage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MaxUsage`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.MaxUsage))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.KernelUsage))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"KernelUsage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `KernelUsage`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.KernelUsage))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.KernelMaxUsage))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"KernelMaxUsage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `KernelMaxUsage`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.KernelMaxUsage))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if x.Measured == nil {
r.EncodeNil()
} else {
if false {
} else {
z.F.EncSliceStringV(x.Measured, e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Measured\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Measured`)
}
r.WriteMapElemValue()
if x.Measured == nil {
r.EncodeNil()
} else {
if false {
} else {
z.F.EncSliceStringV(x.Measured, e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *MemoryStats) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *MemoryStats) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "RSS":
if r.TryDecodeAsNil() {
x.RSS = 0
} else {
x.RSS = (uint64)(r.DecodeUint64())
}
case "Cache":
if r.TryDecodeAsNil() {
x.Cache = 0
} else {
x.Cache = (uint64)(r.DecodeUint64())
}
case "Swap":
if r.TryDecodeAsNil() {
x.Swap = 0
} else {
x.Swap = (uint64)(r.DecodeUint64())
}
case "Usage":
if r.TryDecodeAsNil() {
x.Usage = 0
} else {
x.Usage = (uint64)(r.DecodeUint64())
}
case "MaxUsage":
if r.TryDecodeAsNil() {
x.MaxUsage = 0
} else {
x.MaxUsage = (uint64)(r.DecodeUint64())
}
case "KernelUsage":
if r.TryDecodeAsNil() {
x.KernelUsage = 0
} else {
x.KernelUsage = (uint64)(r.DecodeUint64())
}
case "KernelMaxUsage":
if r.TryDecodeAsNil() {
x.KernelMaxUsage = 0
} else {
x.KernelMaxUsage = (uint64)(r.DecodeUint64())
}
case "Measured":
if r.TryDecodeAsNil() {
x.Measured = nil
} else {
if false {
} else {
z.F.DecSliceStringX(&x.Measured, d)
}
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *MemoryStats) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj13 int
var yyb13 bool
var yyhl13 bool = l >= 0
yyj13++
if yyhl13 {
yyb13 = yyj13 > l
} else {
yyb13 = r.CheckBreak()
}
if yyb13 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.RSS = 0
} else {
x.RSS = (uint64)(r.DecodeUint64())
}
yyj13++
if yyhl13 {
yyb13 = yyj13 > l
} else {
yyb13 = r.CheckBreak()
}
if yyb13 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Cache = 0
} else {
x.Cache = (uint64)(r.DecodeUint64())
}
yyj13++
if yyhl13 {
yyb13 = yyj13 > l
} else {
yyb13 = r.CheckBreak()
}
if yyb13 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Swap = 0
} else {
x.Swap = (uint64)(r.DecodeUint64())
}
yyj13++
if yyhl13 {
yyb13 = yyj13 > l
} else {
yyb13 = r.CheckBreak()
}
if yyb13 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Usage = 0
} else {
x.Usage = (uint64)(r.DecodeUint64())
}
yyj13++
if yyhl13 {
yyb13 = yyj13 > l
} else {
yyb13 = r.CheckBreak()
}
if yyb13 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.MaxUsage = 0
} else {
x.MaxUsage = (uint64)(r.DecodeUint64())
}
yyj13++
if yyhl13 {
yyb13 = yyj13 > l
} else {
yyb13 = r.CheckBreak()
}
if yyb13 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.KernelUsage = 0
} else {
x.KernelUsage = (uint64)(r.DecodeUint64())
}
yyj13++
if yyhl13 {
yyb13 = yyj13 > l
} else {
yyb13 = r.CheckBreak()
}
if yyb13 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.KernelMaxUsage = 0
} else {
x.KernelMaxUsage = (uint64)(r.DecodeUint64())
}
yyj13++
if yyhl13 {
yyb13 = yyj13 > l
} else {
yyb13 = r.CheckBreak()
}
if yyb13 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Measured = nil
} else {
if false {
} else {
z.F.DecSliceStringX(&x.Measured, d)
}
}
for {
yyj13++
if yyhl13 {
yyb13 = yyj13 > l
} else {
yyb13 = r.CheckBreak()
}
if yyb13 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj13-1, "")
}
r.ReadArrayEnd()
}
func (x *CpuStats) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(7)
} else {
r.WriteMapStart(7)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeFloat64(float64(x.SystemMode))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"SystemMode\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `SystemMode`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeFloat64(float64(x.SystemMode))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeFloat64(float64(x.UserMode))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"UserMode\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `UserMode`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeFloat64(float64(x.UserMode))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeFloat64(float64(x.TotalTicks))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"TotalTicks\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `TotalTicks`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeFloat64(float64(x.TotalTicks))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.ThrottledPeriods))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"ThrottledPeriods\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `ThrottledPeriods`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.ThrottledPeriods))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeUint(uint64(x.ThrottledTime))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"ThrottledTime\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `ThrottledTime`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeUint(uint64(x.ThrottledTime))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeFloat64(float64(x.Percent))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Percent\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Percent`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeFloat64(float64(x.Percent))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if x.Measured == nil {
r.EncodeNil()
} else {
if false {
} else {
z.F.EncSliceStringV(x.Measured, e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Measured\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Measured`)
}
r.WriteMapElemValue()
if x.Measured == nil {
r.EncodeNil()
} else {
if false {
} else {
z.F.EncSliceStringV(x.Measured, e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *CpuStats) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *CpuStats) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "SystemMode":
if r.TryDecodeAsNil() {
x.SystemMode = 0
} else {
x.SystemMode = (float64)(r.DecodeFloat64())
}
case "UserMode":
if r.TryDecodeAsNil() {
x.UserMode = 0
} else {
x.UserMode = (float64)(r.DecodeFloat64())
}
case "TotalTicks":
if r.TryDecodeAsNil() {
x.TotalTicks = 0
} else {
x.TotalTicks = (float64)(r.DecodeFloat64())
}
case "ThrottledPeriods":
if r.TryDecodeAsNil() {
x.ThrottledPeriods = 0
} else {
x.ThrottledPeriods = (uint64)(r.DecodeUint64())
}
case "ThrottledTime":
if r.TryDecodeAsNil() {
x.ThrottledTime = 0
} else {
x.ThrottledTime = (uint64)(r.DecodeUint64())
}
case "Percent":
if r.TryDecodeAsNil() {
x.Percent = 0
} else {
x.Percent = (float64)(r.DecodeFloat64())
}
case "Measured":
if r.TryDecodeAsNil() {
x.Measured = nil
} else {
if false {
} else {
z.F.DecSliceStringX(&x.Measured, d)
}
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *CpuStats) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj12 int
var yyb12 bool
var yyhl12 bool = l >= 0
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.SystemMode = 0
} else {
x.SystemMode = (float64)(r.DecodeFloat64())
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.UserMode = 0
} else {
x.UserMode = (float64)(r.DecodeFloat64())
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.TotalTicks = 0
} else {
x.TotalTicks = (float64)(r.DecodeFloat64())
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.ThrottledPeriods = 0
} else {
x.ThrottledPeriods = (uint64)(r.DecodeUint64())
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.ThrottledTime = 0
} else {
x.ThrottledTime = (uint64)(r.DecodeUint64())
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Percent = 0
} else {
x.Percent = (float64)(r.DecodeFloat64())
}
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Measured = nil
} else {
if false {
} else {
z.F.DecSliceStringX(&x.Measured, d)
}
}
for {
yyj12++
if yyhl12 {
yyb12 = yyj12 > l
} else {
yyb12 = r.CheckBreak()
}
if yyb12 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj12-1, "")
}
r.ReadArrayEnd()
}
func (x *ResourceUsage) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(3)
} else {
r.WriteMapStart(3)
}
var yyn3 bool
if x.MemoryStats == nil {
yyn3 = true
goto LABEL3
}
LABEL3:
if yyr2 || yy2arr2 {
if yyn3 {
r.WriteArrayElem()
r.EncodeNil()
} else {
r.WriteArrayElem()
if x.MemoryStats == nil {
r.EncodeNil()
} else {
x.MemoryStats.CodecEncodeSelf(e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"MemoryStats\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `MemoryStats`)
}
r.WriteMapElemValue()
if yyn3 {
r.EncodeNil()
} else {
if x.MemoryStats == nil {
r.EncodeNil()
} else {
x.MemoryStats.CodecEncodeSelf(e)
}
}
}
var yyn6 bool
if x.CpuStats == nil {
yyn6 = true
goto LABEL6
}
LABEL6:
if yyr2 || yy2arr2 {
if yyn6 {
r.WriteArrayElem()
r.EncodeNil()
} else {
r.WriteArrayElem()
if x.CpuStats == nil {
r.EncodeNil()
} else {
x.CpuStats.CodecEncodeSelf(e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"CpuStats\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `CpuStats`)
}
r.WriteMapElemValue()
if yyn6 {
r.EncodeNil()
} else {
if x.CpuStats == nil {
r.EncodeNil()
} else {
x.CpuStats.CodecEncodeSelf(e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if x.DeviceStats == nil {
r.EncodeNil()
} else {
if false {
} else {
h.encSlicePtrtodevice_DeviceGroupStats(([]*pkg2_device.DeviceGroupStats)(x.DeviceStats), e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"DeviceStats\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `DeviceStats`)
}
r.WriteMapElemValue()
if x.DeviceStats == nil {
r.EncodeNil()
} else {
if false {
} else {
h.encSlicePtrtodevice_DeviceGroupStats(([]*pkg2_device.DeviceGroupStats)(x.DeviceStats), e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *ResourceUsage) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *ResourceUsage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "MemoryStats":
if r.TryDecodeAsNil() {
if true && x.MemoryStats != nil {
x.MemoryStats = nil
}
} else {
if x.MemoryStats == nil {
x.MemoryStats = new(MemoryStats)
}
x.MemoryStats.CodecDecodeSelf(d)
}
case "CpuStats":
if r.TryDecodeAsNil() {
if true && x.CpuStats != nil {
x.CpuStats = nil
}
} else {
if x.CpuStats == nil {
x.CpuStats = new(CpuStats)
}
x.CpuStats.CodecDecodeSelf(d)
}
case "DeviceStats":
if r.TryDecodeAsNil() {
x.DeviceStats = nil
} else {
if false {
} else {
h.decSlicePtrtodevice_DeviceGroupStats((*[]*pkg2_device.DeviceGroupStats)(&x.DeviceStats), d)
}
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *ResourceUsage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj8 int
var yyb8 bool
var yyhl8 bool = l >= 0
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
}
if yyb8 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
if true && x.MemoryStats != nil {
x.MemoryStats = nil
}
} else {
if x.MemoryStats == nil {
x.MemoryStats = new(MemoryStats)
}
x.MemoryStats.CodecDecodeSelf(d)
}
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
}
if yyb8 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
if true && x.CpuStats != nil {
x.CpuStats = nil
}
} else {
if x.CpuStats == nil {
x.CpuStats = new(CpuStats)
}
x.CpuStats.CodecDecodeSelf(d)
}
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
}
if yyb8 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.DeviceStats = nil
} else {
if false {
} else {
h.decSlicePtrtodevice_DeviceGroupStats((*[]*pkg2_device.DeviceGroupStats)(&x.DeviceStats), d)
}
}
for {
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
}
if yyb8 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj8-1, "")
}
r.ReadArrayEnd()
}
func (x *TaskResourceUsage) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(3)
} else {
r.WriteMapStart(3)
}
var yyn3 bool
if x.ResourceUsage == nil {
yyn3 = true
goto LABEL3
}
LABEL3:
if yyr2 || yy2arr2 {
if yyn3 {
r.WriteArrayElem()
r.EncodeNil()
} else {
r.WriteArrayElem()
if x.ResourceUsage == nil {
r.EncodeNil()
} else {
x.ResourceUsage.CodecEncodeSelf(e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"ResourceUsage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `ResourceUsage`)
}
r.WriteMapElemValue()
if yyn3 {
r.EncodeNil()
} else {
if x.ResourceUsage == nil {
r.EncodeNil()
} else {
x.ResourceUsage.CodecEncodeSelf(e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.Timestamp))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Timestamp\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Timestamp`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.Timestamp))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if x.Pids == nil {
r.EncodeNil()
} else {
if false {
} else {
h.encMapstringPtrtoResourceUsage((map[string]*ResourceUsage)(x.Pids), e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Pids\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Pids`)
}
r.WriteMapElemValue()
if x.Pids == nil {
r.EncodeNil()
} else {
if false {
} else {
h.encMapstringPtrtoResourceUsage((map[string]*ResourceUsage)(x.Pids), e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *TaskResourceUsage) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *TaskResourceUsage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "ResourceUsage":
if r.TryDecodeAsNil() {
if true && x.ResourceUsage != nil {
x.ResourceUsage = nil
}
} else {
if x.ResourceUsage == nil {
x.ResourceUsage = new(ResourceUsage)
}
x.ResourceUsage.CodecDecodeSelf(d)
}
case "Timestamp":
if r.TryDecodeAsNil() {
x.Timestamp = 0
} else {
x.Timestamp = (int64)(r.DecodeInt64())
}
case "Pids":
if r.TryDecodeAsNil() {
x.Pids = nil
} else {
if false {
} else {
h.decMapstringPtrtoResourceUsage((*map[string]*ResourceUsage)(&x.Pids), d)
}
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *TaskResourceUsage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj8 int
var yyb8 bool
var yyhl8 bool = l >= 0
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
}
if yyb8 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
if true && x.ResourceUsage != nil {
x.ResourceUsage = nil
}
} else {
if x.ResourceUsage == nil {
x.ResourceUsage = new(ResourceUsage)
}
x.ResourceUsage.CodecDecodeSelf(d)
}
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
}
if yyb8 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Timestamp = 0
} else {
x.Timestamp = (int64)(r.DecodeInt64())
}
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
}
if yyb8 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Pids = nil
} else {
if false {
} else {
h.decMapstringPtrtoResourceUsage((*map[string]*ResourceUsage)(&x.Pids), d)
}
}
for {
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
}
if yyb8 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj8-1, "")
}
r.ReadArrayEnd()
}
func (x *AllocResourceUsage) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(3)
} else {
r.WriteMapStart(3)
}
var yyn3 bool
if x.ResourceUsage == nil {
yyn3 = true
goto LABEL3
}
LABEL3:
if yyr2 || yy2arr2 {
if yyn3 {
r.WriteArrayElem()
r.EncodeNil()
} else {
r.WriteArrayElem()
if x.ResourceUsage == nil {
r.EncodeNil()
} else {
x.ResourceUsage.CodecEncodeSelf(e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"ResourceUsage\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `ResourceUsage`)
}
r.WriteMapElemValue()
if yyn3 {
r.EncodeNil()
} else {
if x.ResourceUsage == nil {
r.EncodeNil()
} else {
x.ResourceUsage.CodecEncodeSelf(e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if x.Tasks == nil {
r.EncodeNil()
} else {
if false {
} else {
h.encMapstringPtrtoTaskResourceUsage((map[string]*TaskResourceUsage)(x.Tasks), e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Tasks\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Tasks`)
}
r.WriteMapElemValue()
if x.Tasks == nil {
r.EncodeNil()
} else {
if false {
} else {
h.encMapstringPtrtoTaskResourceUsage((map[string]*TaskResourceUsage)(x.Tasks), e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeInt(int64(x.Timestamp))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Timestamp\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Timestamp`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeInt(int64(x.Timestamp))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *AllocResourceUsage) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *AllocResourceUsage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "ResourceUsage":
if r.TryDecodeAsNil() {
if true && x.ResourceUsage != nil {
x.ResourceUsage = nil
}
} else {
if x.ResourceUsage == nil {
x.ResourceUsage = new(ResourceUsage)
}
x.ResourceUsage.CodecDecodeSelf(d)
}
case "Tasks":
if r.TryDecodeAsNil() {
x.Tasks = nil
} else {
if false {
} else {
h.decMapstringPtrtoTaskResourceUsage((*map[string]*TaskResourceUsage)(&x.Tasks), d)
}
}
case "Timestamp":
if r.TryDecodeAsNil() {
x.Timestamp = 0
} else {
x.Timestamp = (int64)(r.DecodeInt64())
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *AllocResourceUsage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj8 int
var yyb8 bool
var yyhl8 bool = l >= 0
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
}
if yyb8 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
if true && x.ResourceUsage != nil {
x.ResourceUsage = nil
}
} else {
if x.ResourceUsage == nil {
x.ResourceUsage = new(ResourceUsage)
}
x.ResourceUsage.CodecDecodeSelf(d)
}
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
}
if yyb8 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Tasks = nil
} else {
if false {
} else {
h.decMapstringPtrtoTaskResourceUsage((*map[string]*TaskResourceUsage)(&x.Tasks), d)
}
}
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
}
if yyb8 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Timestamp = 0
} else {
x.Timestamp = (int64)(r.DecodeInt64())
}
for {
yyj8++
if yyhl8 {
yyb8 = yyj8 > l
} else {
yyb8 = r.CheckBreak()
}
if yyb8 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj8-1, "")
}
r.ReadArrayEnd()
}
func (x *HealthCheckRequest) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(0)
} else {
r.WriteMapStart(0)
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *HealthCheckRequest) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *HealthCheckRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *HealthCheckRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj4 int
var yyb4 bool
var yyhl4 bool = l >= 0
for {
yyj4++
if yyhl4 {
yyb4 = yyj4 > l
} else {
yyb4 = r.CheckBreak()
}
if yyb4 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj4-1, "")
}
r.ReadArrayEnd()
}
func (x *HealthCheckResponse) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(1)
} else {
r.WriteMapStart(1)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if x.Drivers == nil {
r.EncodeNil()
} else {
if false {
} else {
h.encMapstringPtrtostructs_DriverInfo((map[string]*pkg4_structs.DriverInfo)(x.Drivers), e)
}
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Drivers\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Drivers`)
}
r.WriteMapElemValue()
if x.Drivers == nil {
r.EncodeNil()
} else {
if false {
} else {
h.encMapstringPtrtostructs_DriverInfo((map[string]*pkg4_structs.DriverInfo)(x.Drivers), e)
}
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *HealthCheckResponse) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *HealthCheckResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "Drivers":
if r.TryDecodeAsNil() {
x.Drivers = nil
} else {
if false {
} else {
h.decMapstringPtrtostructs_DriverInfo((*map[string]*pkg4_structs.DriverInfo)(&x.Drivers), d)
}
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *HealthCheckResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj6 int
var yyb6 bool
var yyhl6 bool = l >= 0
yyj6++
if yyhl6 {
yyb6 = yyj6 > l
} else {
yyb6 = r.CheckBreak()
}
if yyb6 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Drivers = nil
} else {
if false {
} else {
h.decMapstringPtrtostructs_DriverInfo((*map[string]*pkg4_structs.DriverInfo)(&x.Drivers), d)
}
}
for {
yyj6++
if yyhl6 {
yyb6 = yyj6 > l
} else {
yyb6 = r.CheckBreak()
}
if yyb6 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj6-1, "")
}
r.ReadArrayEnd()
}
func (x *HealthCheckIntervalRequest) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(0)
} else {
r.WriteMapStart(0)
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *HealthCheckIntervalRequest) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *HealthCheckIntervalRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *HealthCheckIntervalRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj4 int
var yyb4 bool
var yyhl4 bool = l >= 0
for {
yyj4++
if yyhl4 {
yyb4 = yyj4 > l
} else {
yyb4 = r.CheckBreak()
}
if yyb4 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj4-1, "")
}
r.ReadArrayEnd()
}
func (x *HealthCheckIntervalResponse) CodecEncodeSelf(e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
if x == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.EncExtension(x, yyxt1)
} else {
yysep2 := !z.EncBinary()
yy2arr2 := z.EncBasicHandle().StructToArray
_, _ = yysep2, yy2arr2
const yyr2 bool = false // struct tag has 'toArray'
if yyr2 || yy2arr2 {
r.WriteArrayStart(2)
} else {
r.WriteMapStart(2)
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else {
r.EncodeBool(bool(x.Eligible))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Eligible\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Eligible`)
}
r.WriteMapElemValue()
if false {
} else {
r.EncodeBool(bool(x.Eligible))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayElem()
if false {
} else if yyxt7 := z.Extension(z.I2Rtid(x.Period)); yyxt7 != nil {
z.EncExtension(x.Period, yyxt7)
} else {
r.EncodeInt(int64(x.Period))
}
} else {
r.WriteMapElemKey()
if z.IsJSONHandle() {
z.WriteStr("\"Period\"")
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, `Period`)
}
r.WriteMapElemValue()
if false {
} else if yyxt8 := z.Extension(z.I2Rtid(x.Period)); yyxt8 != nil {
z.EncExtension(x.Period, yyxt8)
} else {
r.EncodeInt(int64(x.Period))
}
}
if yyr2 || yy2arr2 {
r.WriteArrayEnd()
} else {
r.WriteMapEnd()
}
}
}
}
func (x *HealthCheckIntervalResponse) CodecDecodeSelf(d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
if false {
} else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
z.DecExtension(x, yyxt1)
} else {
yyct2 := r.ContainerType()
if yyct2 == codecSelferValueTypeMap102 {
yyl2 := r.ReadMapStart()
if yyl2 == 0 {
r.ReadMapEnd()
} else {
x.codecDecodeSelfFromMap(yyl2, d)
}
} else if yyct2 == codecSelferValueTypeArray102 {
yyl2 := r.ReadArrayStart()
if yyl2 == 0 {
r.ReadArrayEnd()
} else {
x.codecDecodeSelfFromArray(yyl2, d)
}
} else {
panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102)
}
}
}
func (x *HealthCheckIntervalResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyhl3 bool = l >= 0
for yyj3 := 0; ; yyj3++ {
if yyhl3 {
if yyj3 >= l {
break
}
} else {
if r.CheckBreak() {
break
}
}
r.ReadMapElemKey()
yys3 := z.StringView(r.DecodeStringAsBytes())
r.ReadMapElemValue()
switch yys3 {
case "Eligible":
if r.TryDecodeAsNil() {
x.Eligible = false
} else {
x.Eligible = (bool)(r.DecodeBool())
}
case "Period":
if r.TryDecodeAsNil() {
x.Period = 0
} else {
if false {
} else if yyxt6 := z.Extension(z.I2Rtid(x.Period)); yyxt6 != nil {
z.DecExtension(x.Period, yyxt6)
} else {
x.Period = (time.Duration)(r.DecodeInt64())
}
}
default:
z.DecStructFieldNotFound(-1, yys3)
} // end switch yys3
} // end for yyj3
r.ReadMapEnd()
}
func (x *HealthCheckIntervalResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
var yyj7 int
var yyb7 bool
var yyhl7 bool = l >= 0
yyj7++
if yyhl7 {
yyb7 = yyj7 > l
} else {
yyb7 = r.CheckBreak()
}
if yyb7 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Eligible = false
} else {
x.Eligible = (bool)(r.DecodeBool())
}
yyj7++
if yyhl7 {
yyb7 = yyj7 > l
} else {
yyb7 = r.CheckBreak()
}
if yyb7 {
r.ReadArrayEnd()
return
}
r.ReadArrayElem()
if r.TryDecodeAsNil() {
x.Period = 0
} else {
if false {
} else if yyxt10 := z.Extension(z.I2Rtid(x.Period)); yyxt10 != nil {
z.DecExtension(x.Period, yyxt10)
} else {
x.Period = (time.Duration)(r.DecodeInt64())
}
}
for {
yyj7++
if yyhl7 {
yyb7 = yyj7 > l
} else {
yyb7 = r.CheckBreak()
}
if yyb7 {
break
}
r.ReadArrayElem()
z.DecStructFieldNotFound(yyj7-1, "")
}
r.ReadArrayEnd()
}
func (x codecSelfer102) encSlicePtrtoAllocFileInfo(v []*AllocFileInfo, e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.WriteArrayStart(len(v))
for _, yyv1 := range v {
r.WriteArrayElem()
if yyv1 == nil {
r.EncodeNil()
} else {
yyv1.CodecEncodeSelf(e)
}
}
r.WriteArrayEnd()
}
func (x codecSelfer102) decSlicePtrtoAllocFileInfo(v *[]*AllocFileInfo, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv1 := *v
yyh1, yyl1 := z.DecSliceHelperStart()
var yyc1 bool
_ = yyc1
if yyl1 == 0 {
if yyv1 == nil {
yyv1 = []*AllocFileInfo{}
yyc1 = true
} else if len(yyv1) != 0 {
yyv1 = yyv1[:0]
yyc1 = true
}
} else {
yyhl1 := yyl1 > 0
var yyrl1 int
_ = yyrl1
if yyhl1 {
if yyl1 > cap(yyv1) {
yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8)
if yyrl1 <= cap(yyv1) {
yyv1 = yyv1[:yyrl1]
} else {
yyv1 = make([]*AllocFileInfo, yyrl1)
}
yyc1 = true
} else if yyl1 != len(yyv1) {
yyv1 = yyv1[:yyl1]
yyc1 = true
}
}
var yyj1 int
// var yydn1 bool
for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination
if yyj1 == 0 && yyv1 == nil {
if yyhl1 {
yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8)
} else {
yyrl1 = 8
}
yyv1 = make([]*AllocFileInfo, yyrl1)
yyc1 = true
}
yyh1.ElemContainerState(yyj1)
var yydb1 bool
if yyj1 >= len(yyv1) {
yyv1 = append(yyv1, nil)
yyc1 = true
}
if yydb1 {
z.DecSwallow()
} else {
if r.TryDecodeAsNil() {
yyv1[yyj1] = nil
} else {
if yyv1[yyj1] == nil {
yyv1[yyj1] = new(AllocFileInfo)
}
yyv1[yyj1].CodecDecodeSelf(d)
}
}
}
if yyj1 < len(yyv1) {
yyv1 = yyv1[:yyj1]
yyc1 = true
} else if yyj1 == 0 && yyv1 == nil {
yyv1 = make([]*AllocFileInfo, 0)
yyc1 = true
}
}
yyh1.End()
if yyc1 {
*v = yyv1
}
}
func (x codecSelfer102) encSlicePtrtodevice_DeviceGroupStats(v []*pkg2_device.DeviceGroupStats, e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.WriteArrayStart(len(v))
for _, yyv1 := range v {
r.WriteArrayElem()
if yyv1 == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt2 := z.Extension(z.I2Rtid(yyv1)); yyxt2 != nil {
z.EncExtension(yyv1, yyxt2)
} else {
z.EncFallback(yyv1)
}
}
}
r.WriteArrayEnd()
}
func (x codecSelfer102) decSlicePtrtodevice_DeviceGroupStats(v *[]*pkg2_device.DeviceGroupStats, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv1 := *v
yyh1, yyl1 := z.DecSliceHelperStart()
var yyc1 bool
_ = yyc1
if yyl1 == 0 {
if yyv1 == nil {
yyv1 = []*pkg2_device.DeviceGroupStats{}
yyc1 = true
} else if len(yyv1) != 0 {
yyv1 = yyv1[:0]
yyc1 = true
}
} else {
yyhl1 := yyl1 > 0
var yyrl1 int
_ = yyrl1
if yyhl1 {
if yyl1 > cap(yyv1) {
yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8)
if yyrl1 <= cap(yyv1) {
yyv1 = yyv1[:yyrl1]
} else {
yyv1 = make([]*pkg2_device.DeviceGroupStats, yyrl1)
}
yyc1 = true
} else if yyl1 != len(yyv1) {
yyv1 = yyv1[:yyl1]
yyc1 = true
}
}
var yyj1 int
// var yydn1 bool
for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination
if yyj1 == 0 && yyv1 == nil {
if yyhl1 {
yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8)
} else {
yyrl1 = 8
}
yyv1 = make([]*pkg2_device.DeviceGroupStats, yyrl1)
yyc1 = true
}
yyh1.ElemContainerState(yyj1)
var yydb1 bool
if yyj1 >= len(yyv1) {
yyv1 = append(yyv1, nil)
yyc1 = true
}
if yydb1 {
z.DecSwallow()
} else {
if r.TryDecodeAsNil() {
yyv1[yyj1] = nil
} else {
if yyv1[yyj1] == nil {
yyv1[yyj1] = new(pkg2_device.DeviceGroupStats)
}
if false {
} else if yyxt3 := z.Extension(z.I2Rtid(yyv1[yyj1])); yyxt3 != nil {
z.DecExtension(yyv1[yyj1], yyxt3)
} else {
z.DecFallback(yyv1[yyj1], false)
}
}
}
}
if yyj1 < len(yyv1) {
yyv1 = yyv1[:yyj1]
yyc1 = true
} else if yyj1 == 0 && yyv1 == nil {
yyv1 = make([]*pkg2_device.DeviceGroupStats, 0)
yyc1 = true
}
}
yyh1.End()
if yyc1 {
*v = yyv1
}
}
func (x codecSelfer102) encMapstringPtrtoResourceUsage(v map[string]*ResourceUsage, e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.WriteMapStart(len(v))
for yyk1, yyv1 := range v {
r.WriteMapElemKey()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(yyk1)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(yyk1))
}
}
r.WriteMapElemValue()
if yyv1 == nil {
r.EncodeNil()
} else {
yyv1.CodecEncodeSelf(e)
}
}
r.WriteMapEnd()
}
func (x codecSelfer102) decMapstringPtrtoResourceUsage(v *map[string]*ResourceUsage, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv1 := *v
yyl1 := r.ReadMapStart()
yybh1 := z.DecBasicHandle()
if yyv1 == nil {
yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24)
yyv1 = make(map[string]*ResourceUsage, yyrl1)
*v = yyv1
}
var yymk1 string
var yymv1 *ResourceUsage
var yymg1, yymdn1, yyms1, yymok1 bool
if yybh1.MapValueReset {
yymg1 = true
}
if yyl1 != 0 {
yyhl1 := yyl1 > 0
for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ {
r.ReadMapElemKey()
if r.TryDecodeAsNil() {
yymk1 = ""
} else {
yymk1 = (string)(r.DecodeString())
}
yyms1 = true
if yymg1 {
yymv1, yymok1 = yyv1[yymk1]
if yymok1 {
yyms1 = false
}
} else {
yymv1 = nil
}
r.ReadMapElemValue()
yymdn1 = false
if r.TryDecodeAsNil() {
yymdn1 = true
} else {
if yymv1 == nil {
yymv1 = new(ResourceUsage)
}
yymv1.CodecDecodeSelf(d)
}
if yymdn1 {
if yybh1.DeleteOnNilMapValue {
delete(yyv1, yymk1)
} else {
yyv1[yymk1] = nil
}
} else if yyms1 && yyv1 != nil {
yyv1[yymk1] = yymv1
}
}
} // else len==0: TODO: Should we clear map entries?
r.ReadMapEnd()
}
func (x codecSelfer102) encMapstringPtrtoTaskResourceUsage(v map[string]*TaskResourceUsage, e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.WriteMapStart(len(v))
for yyk1, yyv1 := range v {
r.WriteMapElemKey()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(yyk1)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(yyk1))
}
}
r.WriteMapElemValue()
if yyv1 == nil {
r.EncodeNil()
} else {
yyv1.CodecEncodeSelf(e)
}
}
r.WriteMapEnd()
}
func (x codecSelfer102) decMapstringPtrtoTaskResourceUsage(v *map[string]*TaskResourceUsage, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv1 := *v
yyl1 := r.ReadMapStart()
yybh1 := z.DecBasicHandle()
if yyv1 == nil {
yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24)
yyv1 = make(map[string]*TaskResourceUsage, yyrl1)
*v = yyv1
}
var yymk1 string
var yymv1 *TaskResourceUsage
var yymg1, yymdn1, yyms1, yymok1 bool
if yybh1.MapValueReset {
yymg1 = true
}
if yyl1 != 0 {
yyhl1 := yyl1 > 0
for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ {
r.ReadMapElemKey()
if r.TryDecodeAsNil() {
yymk1 = ""
} else {
yymk1 = (string)(r.DecodeString())
}
yyms1 = true
if yymg1 {
yymv1, yymok1 = yyv1[yymk1]
if yymok1 {
yyms1 = false
}
} else {
yymv1 = nil
}
r.ReadMapElemValue()
yymdn1 = false
if r.TryDecodeAsNil() {
yymdn1 = true
} else {
if yymv1 == nil {
yymv1 = new(TaskResourceUsage)
}
yymv1.CodecDecodeSelf(d)
}
if yymdn1 {
if yybh1.DeleteOnNilMapValue {
delete(yyv1, yymk1)
} else {
yyv1[yymk1] = nil
}
} else if yyms1 && yyv1 != nil {
yyv1[yymk1] = yymv1
}
}
} // else len==0: TODO: Should we clear map entries?
r.ReadMapEnd()
}
func (x codecSelfer102) encMapstringPtrtostructs_DriverInfo(v map[string]*pkg4_structs.DriverInfo, e *codec1978.Encoder) {
var h codecSelfer102
z, r := codec1978.GenHelperEncoder(e)
_, _, _ = h, z, r
r.WriteMapStart(len(v))
for yyk1, yyv1 := range v {
r.WriteMapElemKey()
if false {
} else {
if z.EncBasicHandle().StringToRaw {
r.EncodeStringBytesRaw(z.BytesView(string(yyk1)))
} else {
r.EncodeStringEnc(codecSelferCcUTF8102, string(yyk1))
}
}
r.WriteMapElemValue()
if yyv1 == nil {
r.EncodeNil()
} else {
if false {
} else if yyxt3 := z.Extension(z.I2Rtid(yyv1)); yyxt3 != nil {
z.EncExtension(yyv1, yyxt3)
} else {
z.EncFallback(yyv1)
}
}
}
r.WriteMapEnd()
}
func (x codecSelfer102) decMapstringPtrtostructs_DriverInfo(v *map[string]*pkg4_structs.DriverInfo, d *codec1978.Decoder) {
var h codecSelfer102
z, r := codec1978.GenHelperDecoder(d)
_, _, _ = h, z, r
yyv1 := *v
yyl1 := r.ReadMapStart()
yybh1 := z.DecBasicHandle()
if yyv1 == nil {
yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24)
yyv1 = make(map[string]*pkg4_structs.DriverInfo, yyrl1)
*v = yyv1
}
var yymk1 string
var yymv1 *pkg4_structs.DriverInfo
var yymg1, yymdn1, yyms1, yymok1 bool
if yybh1.MapValueReset {
yymg1 = true
}
if yyl1 != 0 {
yyhl1 := yyl1 > 0
for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ {
r.ReadMapElemKey()
if r.TryDecodeAsNil() {
yymk1 = ""
} else {
yymk1 = (string)(r.DecodeString())
}
yyms1 = true
if yymg1 {
yymv1, yymok1 = yyv1[yymk1]
if yymok1 {
yyms1 = false
}
} else {
yymv1 = nil
}
r.ReadMapElemValue()
yymdn1 = false
if r.TryDecodeAsNil() {
yymdn1 = true
} else {
if yymv1 == nil {
yymv1 = new(pkg4_structs.DriverInfo)
}
if false {
} else if yyxt4 := z.Extension(z.I2Rtid(yymv1)); yyxt4 != nil {
z.DecExtension(yymv1, yyxt4)
} else {
z.DecFallback(yymv1, false)
}
}
if yymdn1 {
if yybh1.DeleteOnNilMapValue {
delete(yyv1, yymk1)
} else {
yyv1[yymk1] = nil
}
} else if yyms1 && yyv1 != nil {
yyv1[yymk1] = yymv1
}
}
} // else len==0: TODO: Should we clear map entries?
r.ReadMapEnd()
}