From 284fc3aed72f9a2b55812d5f576aaece6ccd0666 Mon Sep 17 00:00:00 2001 From: Nomad Release bot Date: Wed, 19 Feb 2020 19:15:33 +0000 Subject: [PATCH] Generate files for 0.10.4 release --- nomad/structs/structs_ent.generated.go | 10675 +++++++++++++++++++++++ nomad/structs/structs_pro.generated.go | 3783 ++++++++ 2 files changed, 14458 insertions(+) create mode 100644 nomad/structs/structs_ent.generated.go create mode 100644 nomad/structs/structs_pro.generated.go diff --git a/nomad/structs/structs_ent.generated.go b/nomad/structs/structs_ent.generated.go new file mode 100644 index 00000000000..a60f2858274 --- /dev/null +++ b/nomad/structs/structs_ent.generated.go @@ -0,0 +1,10675 @@ +// +build ent + +// Code generated by codecgen - DO NOT EDIT. + +package structs + +import ( + "errors" + codec1978 "github.com/ugorji/go/codec" + "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 time.Duration + _ = v0 + } +} + +func (x *SentinelPolicy) 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 { + 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 { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Description))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Description)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Description\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Description`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Description))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Description)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Scope))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Scope)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Scope\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Scope`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Scope))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Scope)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.EnforcementLevel))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.EnforcementLevel)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"EnforcementLevel\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `EnforcementLevel`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.EnforcementLevel))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.EnforcementLevel)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Policy))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Policy)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Policy\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Policy`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Policy))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Policy)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Hash == nil { + r.EncodeNil() + } else { + if false { + } else { + r.EncodeStringBytesRaw([]byte(x.Hash)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Hash\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Hash`) + } + r.WriteMapElemValue() + if x.Hash == nil { + r.EncodeNil() + } else { + if false { + } else { + r.EncodeStringBytesRaw([]byte(x.Hash)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + r.EncodeUint(uint64(x.CreateIndex)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"CreateIndex\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `CreateIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.CreateIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + r.EncodeUint(uint64(x.ModifyIndex)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"ModifyIndex\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `ModifyIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.ModifyIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *SentinelPolicy) 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 *SentinelPolicy) 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 "Description": + if r.TryDecodeAsNil() { + x.Description = "" + } else { + x.Description = (string)(r.DecodeString()) + } + case "Scope": + if r.TryDecodeAsNil() { + x.Scope = "" + } else { + x.Scope = (string)(r.DecodeString()) + } + case "EnforcementLevel": + if r.TryDecodeAsNil() { + x.EnforcementLevel = "" + } else { + x.EnforcementLevel = (string)(r.DecodeString()) + } + case "Policy": + if r.TryDecodeAsNil() { + x.Policy = "" + } else { + x.Policy = (string)(r.DecodeString()) + } + case "Hash": + if r.TryDecodeAsNil() { + x.Hash = nil + } else { + if false { + } else { + x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) + } + } + case "CreateIndex": + if r.TryDecodeAsNil() { + x.CreateIndex = 0 + } else { + x.CreateIndex = (uint64)(r.DecodeUint64()) + } + case "ModifyIndex": + if r.TryDecodeAsNil() { + x.ModifyIndex = 0 + } else { + x.ModifyIndex = (uint64)(r.DecodeUint64()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *SentinelPolicy) 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.Name = "" + } else { + x.Name = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Description = "" + } else { + x.Description = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Scope = "" + } else { + x.Scope = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.EnforcementLevel = "" + } else { + x.EnforcementLevel = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Policy = "" + } else { + x.Policy = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Hash = nil + } else { + if false { + } else { + x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.CreateIndex = 0 + } else { + x.CreateIndex = (uint64)(r.DecodeUint64()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.ModifyIndex = 0 + } else { + x.ModifyIndex = (uint64)(r.DecodeUint64()) + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj13-1, "") + } + r.ReadArrayEnd() +} + +func (x *SentinelPolicyListStub) 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 { + 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 { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Description))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Description)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Description\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Description`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Description))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Description)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Scope))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Scope)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Scope\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Scope`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Scope))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Scope)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.EnforcementLevel))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.EnforcementLevel)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"EnforcementLevel\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `EnforcementLevel`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.EnforcementLevel))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.EnforcementLevel)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Hash == nil { + r.EncodeNil() + } else { + if false { + } else { + r.EncodeStringBytesRaw([]byte(x.Hash)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Hash\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Hash`) + } + r.WriteMapElemValue() + if x.Hash == nil { + r.EncodeNil() + } else { + if false { + } else { + r.EncodeStringBytesRaw([]byte(x.Hash)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + r.EncodeUint(uint64(x.CreateIndex)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"CreateIndex\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `CreateIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.CreateIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + r.EncodeUint(uint64(x.ModifyIndex)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"ModifyIndex\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `ModifyIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.ModifyIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *SentinelPolicyListStub) 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 *SentinelPolicyListStub) 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 "Description": + if r.TryDecodeAsNil() { + x.Description = "" + } else { + x.Description = (string)(r.DecodeString()) + } + case "Scope": + if r.TryDecodeAsNil() { + x.Scope = "" + } else { + x.Scope = (string)(r.DecodeString()) + } + case "EnforcementLevel": + if r.TryDecodeAsNil() { + x.EnforcementLevel = "" + } else { + x.EnforcementLevel = (string)(r.DecodeString()) + } + case "Hash": + if r.TryDecodeAsNil() { + x.Hash = nil + } else { + if false { + } else { + x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) + } + } + case "CreateIndex": + if r.TryDecodeAsNil() { + x.CreateIndex = 0 + } else { + x.CreateIndex = (uint64)(r.DecodeUint64()) + } + case "ModifyIndex": + if r.TryDecodeAsNil() { + x.ModifyIndex = 0 + } else { + x.ModifyIndex = (uint64)(r.DecodeUint64()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *SentinelPolicyListStub) 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.Name = "" + } else { + x.Name = (string)(r.DecodeString()) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Description = "" + } else { + x.Description = (string)(r.DecodeString()) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Scope = "" + } else { + x.Scope = (string)(r.DecodeString()) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.EnforcementLevel = "" + } else { + x.EnforcementLevel = (string)(r.DecodeString()) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Hash = nil + } else { + if false { + } else { + x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.CreateIndex = 0 + } else { + x.CreateIndex = (uint64)(r.DecodeUint64()) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.ModifyIndex = 0 + } else { + x.ModifyIndex = (uint64)(r.DecodeUint64()) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj12-1, "") + } + r.ReadArrayEnd() +} + +func (x *SentinelPolicyListRequest) 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 { + 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 yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { + z.EncExtension(x.MaxQueryTime, yyxt13) + } 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 yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { + z.EncExtension(x.MaxQueryTime, yyxt14) + } 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.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 *SentinelPolicyListRequest) 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 *SentinelPolicyListRequest) 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 "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 yyxt8 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt8 != nil { + z.DecExtension(x.MaxQueryTime, yyxt8) + } 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 "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 *SentinelPolicyListRequest) 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.QueryOptions.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MinQueryIndex = 0 + } else { + x.MinQueryIndex = (uint64)(r.DecodeUint64()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MaxQueryTime = 0 + } else { + if false { + } else if yyxt18 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt18 != nil { + z.DecExtension(x.MaxQueryTime, yyxt18) + } else { + x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AllowStale = false + } else { + x.AllowStale = (bool)(r.DecodeBool()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Prefix = "" + } else { + x.Prefix = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj13-1, "") + } + r.ReadArrayEnd() +} + +func (x *SentinelPolicySpecificRequest) 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(9) + } else { + r.WriteMapStart(9) + } + 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 { + 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 yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { + z.EncExtension(x.MaxQueryTime, yyxt16) + } 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 yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { + z.EncExtension(x.MaxQueryTime, yyxt17) + } 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.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 *SentinelPolicySpecificRequest) 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 *SentinelPolicySpecificRequest) 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 "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 yyxt9 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt9 != nil { + z.DecExtension(x.MaxQueryTime, yyxt9) + } 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 "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 *SentinelPolicySpecificRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer102 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Name = "" + } else { + x.Name = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MinQueryIndex = 0 + } else { + x.MinQueryIndex = (uint64)(r.DecodeUint64()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MaxQueryTime = 0 + } else { + if false { + } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { + z.DecExtension(x.MaxQueryTime, yyxt20) + } else { + x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AllowStale = false + } else { + x.AllowStale = (bool)(r.DecodeBool()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Prefix = "" + } else { + x.Prefix = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj14-1, "") + } + r.ReadArrayEnd() +} + +func (x *SentinelPolicySetRequest) 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(9) + } else { + r.WriteMapStart(9) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Names == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncSliceStringV(x.Names, e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Names\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Names`) + } + r.WriteMapElemValue() + if x.Names == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncSliceStringV(x.Names, 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 yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { + z.EncExtension(x.MaxQueryTime, yyxt16) + } 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 yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { + z.EncExtension(x.MaxQueryTime, yyxt17) + } 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.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 *SentinelPolicySetRequest) 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 *SentinelPolicySetRequest) 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 "Names": + if r.TryDecodeAsNil() { + x.Names = nil + } else { + if false { + } else { + z.F.DecSliceStringX(&x.Names, 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 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 "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 *SentinelPolicySetRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer102 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj15 int + var yyb15 bool + var yyhl15 bool = l >= 0 + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Names = nil + } else { + if false { + } else { + z.F.DecSliceStringX(&x.Names, d) + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MinQueryIndex = 0 + } else { + x.MinQueryIndex = (uint64)(r.DecodeUint64()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MaxQueryTime = 0 + } else { + if false { + } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { + z.DecExtension(x.MaxQueryTime, yyxt22) + } else { + x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AllowStale = false + } else { + x.AllowStale = (bool)(r.DecodeBool()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Prefix = "" + } else { + x.Prefix = (string)(r.DecodeString()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + for { + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj15-1, "") + } + r.ReadArrayEnd() +} + +func (x *SentinelPolicyListResponse) 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.Policies == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoSentinelPolicyListStub(([]*SentinelPolicyListStub)(x.Policies), e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Policies\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Policies`) + } + r.WriteMapElemValue() + if x.Policies == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoSentinelPolicyListStub(([]*SentinelPolicyListStub)(x.Policies), 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 *SentinelPolicyListResponse) 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 *SentinelPolicyListResponse) 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 "Policies": + if r.TryDecodeAsNil() { + x.Policies = nil + } else { + if false { + } else { + h.decSlicePtrtoSentinelPolicyListStub((*[]*SentinelPolicyListStub)(&x.Policies), 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 *SentinelPolicyListResponse) 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.Policies = nil + } else { + if false { + } else { + h.decSlicePtrtoSentinelPolicyListStub((*[]*SentinelPolicyListStub)(&x.Policies), 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 *SingleSentinelPolicyResponse) 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.Policy == nil { + yyn3 = true + goto LABEL3 + } + LABEL3: + if yyr2 || yy2arr2 { + if yyn3 { + r.WriteArrayElem() + r.EncodeNil() + } else { + r.WriteArrayElem() + if x.Policy == nil { + r.EncodeNil() + } else { + x.Policy.CodecEncodeSelf(e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Policy\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Policy`) + } + r.WriteMapElemValue() + if yyn3 { + r.EncodeNil() + } else { + if x.Policy == nil { + r.EncodeNil() + } else { + x.Policy.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 *SingleSentinelPolicyResponse) 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 *SingleSentinelPolicyResponse) 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 "Policy": + if r.TryDecodeAsNil() { + if true && x.Policy != nil { + x.Policy = nil + } + } else { + if x.Policy == nil { + x.Policy = new(SentinelPolicy) + } + + x.Policy.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 *SingleSentinelPolicyResponse) 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.Policy != nil { + x.Policy = nil + } + } else { + if x.Policy == nil { + x.Policy = new(SentinelPolicy) + } + + x.Policy.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 *SentinelPolicySetResponse) 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.Policies == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encMapstringPtrtoSentinelPolicy((map[string]*SentinelPolicy)(x.Policies), e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Policies\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Policies`) + } + r.WriteMapElemValue() + if x.Policies == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encMapstringPtrtoSentinelPolicy((map[string]*SentinelPolicy)(x.Policies), 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 *SentinelPolicySetResponse) 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 *SentinelPolicySetResponse) 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 "Policies": + if r.TryDecodeAsNil() { + x.Policies = nil + } else { + if false { + } else { + h.decMapstringPtrtoSentinelPolicy((*map[string]*SentinelPolicy)(&x.Policies), 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 *SentinelPolicySetResponse) 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.Policies = nil + } else { + if false { + } else { + h.decMapstringPtrtoSentinelPolicy((*map[string]*SentinelPolicy)(&x.Policies), 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 *SentinelPolicyDeleteRequest) 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(5) + } else { + r.WriteMapStart(5) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Names == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncSliceStringV(x.Names, e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Names\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Names`) + } + r.WriteMapElemValue() + if x.Names == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncSliceStringV(x.Names, 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 { + 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.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 *SentinelPolicyDeleteRequest) 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 *SentinelPolicyDeleteRequest) 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 "Names": + if r.TryDecodeAsNil() { + x.Names = nil + } else { + if false { + } else { + z.F.DecSliceStringX(&x.Names, d) + } + } + case "Region": + if r.TryDecodeAsNil() { + x.WriteRequest.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + case "Namespace": + if r.TryDecodeAsNil() { + x.WriteRequest.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + case "AuthToken": + if r.TryDecodeAsNil() { + x.WriteRequest.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + case "Forwarded": + if r.TryDecodeAsNil() { + x.WriteRequest.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *SentinelPolicyDeleteRequest) 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.Names = nil + } else { + if false { + } else { + z.F.DecSliceStringX(&x.Names, d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (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 *SentinelPolicyUpsertRequest) 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(5) + } else { + r.WriteMapStart(5) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Policies == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoSentinelPolicy(([]*SentinelPolicy)(x.Policies), e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Policies\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Policies`) + } + r.WriteMapElemValue() + if x.Policies == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoSentinelPolicy(([]*SentinelPolicy)(x.Policies), 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 { + 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.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 *SentinelPolicyUpsertRequest) 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 *SentinelPolicyUpsertRequest) 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 "Policies": + if r.TryDecodeAsNil() { + x.Policies = nil + } else { + if false { + } else { + h.decSlicePtrtoSentinelPolicy((*[]*SentinelPolicy)(&x.Policies), d) + } + } + case "Region": + if r.TryDecodeAsNil() { + x.WriteRequest.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + case "Namespace": + if r.TryDecodeAsNil() { + x.WriteRequest.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + case "AuthToken": + if r.TryDecodeAsNil() { + x.WriteRequest.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + case "Forwarded": + if r.TryDecodeAsNil() { + x.WriteRequest.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *SentinelPolicyUpsertRequest) 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.Policies = nil + } else { + if false { + } else { + h.decSlicePtrtoSentinelPolicy((*[]*SentinelPolicy)(&x.Policies), d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (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 *QuotaSpec) 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 { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Description))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Description)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Description\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Description`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Description))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Description)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Limits == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoQuotaLimit(([]*QuotaLimit)(x.Limits), e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Limits\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Limits`) + } + r.WriteMapElemValue() + if x.Limits == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoQuotaLimit(([]*QuotaLimit)(x.Limits), e) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Hash == nil { + r.EncodeNil() + } else { + if false { + } else { + r.EncodeStringBytesRaw([]byte(x.Hash)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Hash\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Hash`) + } + r.WriteMapElemValue() + if x.Hash == nil { + r.EncodeNil() + } else { + if false { + } else { + r.EncodeStringBytesRaw([]byte(x.Hash)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + r.EncodeUint(uint64(x.CreateIndex)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"CreateIndex\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `CreateIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.CreateIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + r.EncodeUint(uint64(x.ModifyIndex)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"ModifyIndex\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `ModifyIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.ModifyIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *QuotaSpec) 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 *QuotaSpec) 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 "Description": + if r.TryDecodeAsNil() { + x.Description = "" + } else { + x.Description = (string)(r.DecodeString()) + } + case "Limits": + if r.TryDecodeAsNil() { + x.Limits = nil + } else { + if false { + } else { + h.decSlicePtrtoQuotaLimit((*[]*QuotaLimit)(&x.Limits), d) + } + } + case "Hash": + if r.TryDecodeAsNil() { + x.Hash = nil + } else { + if false { + } else { + x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) + } + } + case "CreateIndex": + if r.TryDecodeAsNil() { + x.CreateIndex = 0 + } else { + x.CreateIndex = (uint64)(r.DecodeUint64()) + } + case "ModifyIndex": + if r.TryDecodeAsNil() { + x.ModifyIndex = 0 + } else { + x.ModifyIndex = (uint64)(r.DecodeUint64()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *QuotaSpec) 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.Name = "" + } else { + x.Name = (string)(r.DecodeString()) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Description = "" + } else { + x.Description = (string)(r.DecodeString()) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Limits = nil + } else { + if false { + } else { + h.decSlicePtrtoQuotaLimit((*[]*QuotaLimit)(&x.Limits), d) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Hash = nil + } else { + if false { + } else { + x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.CreateIndex = 0 + } else { + x.CreateIndex = (uint64)(r.DecodeUint64()) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.ModifyIndex = 0 + } else { + x.ModifyIndex = (uint64)(r.DecodeUint64()) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj12-1, "") + } + r.ReadArrayEnd() +} + +func (x *QuotaLimit) 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) + } + 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)) + } + } + } + var yyn6 bool + if x.RegionLimit == nil { + yyn6 = true + goto LABEL6 + } + LABEL6: + if yyr2 || yy2arr2 { + if yyn6 { + r.WriteArrayElem() + r.EncodeNil() + } else { + r.WriteArrayElem() + if x.RegionLimit == nil { + r.EncodeNil() + } else { + if false { + } else if yyxt7 := z.Extension(z.I2Rtid(x.RegionLimit)); yyxt7 != nil { + z.EncExtension(x.RegionLimit, yyxt7) + } else { + z.EncFallback(x.RegionLimit) + } + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"RegionLimit\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `RegionLimit`) + } + r.WriteMapElemValue() + if yyn6 { + r.EncodeNil() + } else { + if x.RegionLimit == nil { + r.EncodeNil() + } else { + if false { + } else if yyxt8 := z.Extension(z.I2Rtid(x.RegionLimit)); yyxt8 != nil { + z.EncExtension(x.RegionLimit, yyxt8) + } else { + z.EncFallback(x.RegionLimit) + } + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Hash == nil { + r.EncodeNil() + } else { + if false { + } else { + r.EncodeStringBytesRaw([]byte(x.Hash)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Hash\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Hash`) + } + r.WriteMapElemValue() + if x.Hash == nil { + r.EncodeNil() + } else { + if false { + } else { + r.EncodeStringBytesRaw([]byte(x.Hash)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *QuotaLimit) 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 *QuotaLimit) 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 "Region": + if r.TryDecodeAsNil() { + x.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + case "RegionLimit": + if r.TryDecodeAsNil() { + if true && x.RegionLimit != nil { + x.RegionLimit = nil + } + } else { + if x.RegionLimit == nil { + x.RegionLimit = new(Resources) + } + + if false { + } else if yyxt6 := z.Extension(z.I2Rtid(x.RegionLimit)); yyxt6 != nil { + z.DecExtension(x.RegionLimit, yyxt6) + } else { + z.DecFallback(x.RegionLimit, false) + } + } + case "Hash": + if r.TryDecodeAsNil() { + x.Hash = nil + } else { + if false { + } else { + x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *QuotaLimit) 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() { + x.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + if true && x.RegionLimit != nil { + x.RegionLimit = nil + } + } else { + if x.RegionLimit == nil { + x.RegionLimit = new(Resources) + } + + if false { + } else if yyxt12 := z.Extension(z.I2Rtid(x.RegionLimit)); yyxt12 != nil { + z.DecExtension(x.RegionLimit, yyxt12) + } else { + z.DecFallback(x.RegionLimit, false) + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Hash = nil + } else { + if false { + } else { + x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj9-1, "") + } + r.ReadArrayEnd() +} + +func (x *QuotaUsage) 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 if !z.EncBinary() && z.IsJSONHandle() { + z.EncJSONMarshal(x) + } 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 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 x.Used == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encMapstringPtrtoQuotaLimit((map[string]*QuotaLimit)(x.Used), e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Used\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Used`) + } + r.WriteMapElemValue() + if x.Used == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encMapstringPtrtoQuotaLimit((map[string]*QuotaLimit)(x.Used), e) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + r.EncodeUint(uint64(x.CreateIndex)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"CreateIndex\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `CreateIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.CreateIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + r.EncodeUint(uint64(x.ModifyIndex)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"ModifyIndex\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `ModifyIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.ModifyIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *QuotaUsage) 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 if !z.DecBinary() && z.IsJSONHandle() { + z.DecJSONUnmarshal(x) + } 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 *QuotaUsage) 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 "Used": + if r.TryDecodeAsNil() { + x.Used = nil + } else { + if false { + } else { + h.decMapstringPtrtoQuotaLimit((*map[string]*QuotaLimit)(&x.Used), d) + } + } + case "CreateIndex": + if r.TryDecodeAsNil() { + x.CreateIndex = 0 + } else { + x.CreateIndex = (uint64)(r.DecodeUint64()) + } + case "ModifyIndex": + if r.TryDecodeAsNil() { + x.ModifyIndex = 0 + } else { + x.ModifyIndex = (uint64)(r.DecodeUint64()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *QuotaUsage) 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() { + x.Name = "" + } else { + x.Name = (string)(r.DecodeString()) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Used = nil + } else { + if false { + } else { + h.decMapstringPtrtoQuotaLimit((*map[string]*QuotaLimit)(&x.Used), d) + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.CreateIndex = 0 + } else { + x.CreateIndex = (uint64)(r.DecodeUint64()) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.ModifyIndex = 0 + } else { + x.ModifyIndex = (uint64)(r.DecodeUint64()) + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj9-1, "") + } + r.ReadArrayEnd() +} + +func (x *QuotaSpecListRequest) 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 { + 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 yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { + z.EncExtension(x.MaxQueryTime, yyxt13) + } 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 yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { + z.EncExtension(x.MaxQueryTime, yyxt14) + } 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.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 *QuotaSpecListRequest) 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 *QuotaSpecListRequest) 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 "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 yyxt8 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt8 != nil { + z.DecExtension(x.MaxQueryTime, yyxt8) + } 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 "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 *QuotaSpecListRequest) 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.QueryOptions.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MinQueryIndex = 0 + } else { + x.MinQueryIndex = (uint64)(r.DecodeUint64()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MaxQueryTime = 0 + } else { + if false { + } else if yyxt18 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt18 != nil { + z.DecExtension(x.MaxQueryTime, yyxt18) + } else { + x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AllowStale = false + } else { + x.AllowStale = (bool)(r.DecodeBool()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Prefix = "" + } else { + x.Prefix = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj13-1, "") + } + r.ReadArrayEnd() +} + +func (x *QuotaSpecSpecificRequest) 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(9) + } else { + r.WriteMapStart(9) + } + 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 { + 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 yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { + z.EncExtension(x.MaxQueryTime, yyxt16) + } 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 yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { + z.EncExtension(x.MaxQueryTime, yyxt17) + } 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.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 *QuotaSpecSpecificRequest) 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 *QuotaSpecSpecificRequest) 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 "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 yyxt9 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt9 != nil { + z.DecExtension(x.MaxQueryTime, yyxt9) + } 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 "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 *QuotaSpecSpecificRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer102 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Name = "" + } else { + x.Name = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MinQueryIndex = 0 + } else { + x.MinQueryIndex = (uint64)(r.DecodeUint64()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MaxQueryTime = 0 + } else { + if false { + } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { + z.DecExtension(x.MaxQueryTime, yyxt20) + } else { + x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AllowStale = false + } else { + x.AllowStale = (bool)(r.DecodeBool()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Prefix = "" + } else { + x.Prefix = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj14-1, "") + } + r.ReadArrayEnd() +} + +func (x *QuotaSpecSetRequest) 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(9) + } else { + r.WriteMapStart(9) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Names == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncSliceStringV(x.Names, e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Names\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Names`) + } + r.WriteMapElemValue() + if x.Names == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncSliceStringV(x.Names, 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 yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { + z.EncExtension(x.MaxQueryTime, yyxt16) + } 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 yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { + z.EncExtension(x.MaxQueryTime, yyxt17) + } 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.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 *QuotaSpecSetRequest) 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 *QuotaSpecSetRequest) 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 "Names": + if r.TryDecodeAsNil() { + x.Names = nil + } else { + if false { + } else { + z.F.DecSliceStringX(&x.Names, 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 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 "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 *QuotaSpecSetRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer102 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj15 int + var yyb15 bool + var yyhl15 bool = l >= 0 + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Names = nil + } else { + if false { + } else { + z.F.DecSliceStringX(&x.Names, d) + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MinQueryIndex = 0 + } else { + x.MinQueryIndex = (uint64)(r.DecodeUint64()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MaxQueryTime = 0 + } else { + if false { + } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { + z.DecExtension(x.MaxQueryTime, yyxt22) + } else { + x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AllowStale = false + } else { + x.AllowStale = (bool)(r.DecodeBool()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Prefix = "" + } else { + x.Prefix = (string)(r.DecodeString()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + for { + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj15-1, "") + } + r.ReadArrayEnd() +} + +func (x *QuotaSpecListResponse) 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.Quotas == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoQuotaSpec(([]*QuotaSpec)(x.Quotas), e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Quotas\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Quotas`) + } + r.WriteMapElemValue() + if x.Quotas == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoQuotaSpec(([]*QuotaSpec)(x.Quotas), 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 *QuotaSpecListResponse) 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 *QuotaSpecListResponse) 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 "Quotas": + if r.TryDecodeAsNil() { + x.Quotas = nil + } else { + if false { + } else { + h.decSlicePtrtoQuotaSpec((*[]*QuotaSpec)(&x.Quotas), 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 *QuotaSpecListResponse) 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.Quotas = nil + } else { + if false { + } else { + h.decSlicePtrtoQuotaSpec((*[]*QuotaSpec)(&x.Quotas), 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 *SingleQuotaSpecResponse) 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.Quota == nil { + yyn3 = true + goto LABEL3 + } + LABEL3: + if yyr2 || yy2arr2 { + if yyn3 { + r.WriteArrayElem() + r.EncodeNil() + } else { + r.WriteArrayElem() + if x.Quota == nil { + r.EncodeNil() + } else { + x.Quota.CodecEncodeSelf(e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Quota\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Quota`) + } + r.WriteMapElemValue() + if yyn3 { + r.EncodeNil() + } else { + if x.Quota == nil { + r.EncodeNil() + } else { + x.Quota.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 *SingleQuotaSpecResponse) 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 *SingleQuotaSpecResponse) 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 "Quota": + if r.TryDecodeAsNil() { + if true && x.Quota != nil { + x.Quota = nil + } + } else { + if x.Quota == nil { + x.Quota = new(QuotaSpec) + } + + x.Quota.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 *SingleQuotaSpecResponse) 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.Quota != nil { + x.Quota = nil + } + } else { + if x.Quota == nil { + x.Quota = new(QuotaSpec) + } + + x.Quota.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 *QuotaSpecSetResponse) 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.Quotas == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encMapstringPtrtoQuotaSpec((map[string]*QuotaSpec)(x.Quotas), e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Quotas\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Quotas`) + } + r.WriteMapElemValue() + if x.Quotas == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encMapstringPtrtoQuotaSpec((map[string]*QuotaSpec)(x.Quotas), 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 *QuotaSpecSetResponse) 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 *QuotaSpecSetResponse) 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 "Quotas": + if r.TryDecodeAsNil() { + x.Quotas = nil + } else { + if false { + } else { + h.decMapstringPtrtoQuotaSpec((*map[string]*QuotaSpec)(&x.Quotas), 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 *QuotaSpecSetResponse) 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.Quotas = nil + } else { + if false { + } else { + h.decMapstringPtrtoQuotaSpec((*map[string]*QuotaSpec)(&x.Quotas), 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 *QuotaSpecDeleteRequest) 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(5) + } else { + r.WriteMapStart(5) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Names == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncSliceStringV(x.Names, e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Names\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Names`) + } + r.WriteMapElemValue() + if x.Names == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncSliceStringV(x.Names, 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 { + 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.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 *QuotaSpecDeleteRequest) 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 *QuotaSpecDeleteRequest) 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 "Names": + if r.TryDecodeAsNil() { + x.Names = nil + } else { + if false { + } else { + z.F.DecSliceStringX(&x.Names, d) + } + } + case "Region": + if r.TryDecodeAsNil() { + x.WriteRequest.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + case "Namespace": + if r.TryDecodeAsNil() { + x.WriteRequest.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + case "AuthToken": + if r.TryDecodeAsNil() { + x.WriteRequest.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + case "Forwarded": + if r.TryDecodeAsNil() { + x.WriteRequest.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *QuotaSpecDeleteRequest) 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.Names = nil + } else { + if false { + } else { + z.F.DecSliceStringX(&x.Names, d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (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 *QuotaSpecUpsertRequest) 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(5) + } else { + r.WriteMapStart(5) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Quotas == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoQuotaSpec(([]*QuotaSpec)(x.Quotas), e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Quotas\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Quotas`) + } + r.WriteMapElemValue() + if x.Quotas == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoQuotaSpec(([]*QuotaSpec)(x.Quotas), 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 { + 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.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 *QuotaSpecUpsertRequest) 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 *QuotaSpecUpsertRequest) 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 "Quotas": + if r.TryDecodeAsNil() { + x.Quotas = nil + } else { + if false { + } else { + h.decSlicePtrtoQuotaSpec((*[]*QuotaSpec)(&x.Quotas), d) + } + } + case "Region": + if r.TryDecodeAsNil() { + x.WriteRequest.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + case "Namespace": + if r.TryDecodeAsNil() { + x.WriteRequest.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + case "AuthToken": + if r.TryDecodeAsNil() { + x.WriteRequest.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + case "Forwarded": + if r.TryDecodeAsNil() { + x.WriteRequest.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *QuotaSpecUpsertRequest) 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.Quotas = nil + } else { + if false { + } else { + h.decSlicePtrtoQuotaSpec((*[]*QuotaSpec)(&x.Quotas), d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (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 *QuotaUsageListRequest) 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 { + 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 yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { + z.EncExtension(x.MaxQueryTime, yyxt13) + } 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 yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { + z.EncExtension(x.MaxQueryTime, yyxt14) + } 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.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 *QuotaUsageListRequest) 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 *QuotaUsageListRequest) 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 "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 yyxt8 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt8 != nil { + z.DecExtension(x.MaxQueryTime, yyxt8) + } 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 "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 *QuotaUsageListRequest) 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.QueryOptions.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MinQueryIndex = 0 + } else { + x.MinQueryIndex = (uint64)(r.DecodeUint64()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MaxQueryTime = 0 + } else { + if false { + } else if yyxt18 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt18 != nil { + z.DecExtension(x.MaxQueryTime, yyxt18) + } else { + x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AllowStale = false + } else { + x.AllowStale = (bool)(r.DecodeBool()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Prefix = "" + } else { + x.Prefix = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj13-1, "") + } + r.ReadArrayEnd() +} + +func (x *QuotaUsageSpecificRequest) 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(9) + } else { + r.WriteMapStart(9) + } + 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 { + 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 yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { + z.EncExtension(x.MaxQueryTime, yyxt16) + } 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 yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { + z.EncExtension(x.MaxQueryTime, yyxt17) + } 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.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 *QuotaUsageSpecificRequest) 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 *QuotaUsageSpecificRequest) 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 "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 yyxt9 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt9 != nil { + z.DecExtension(x.MaxQueryTime, yyxt9) + } 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 "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 *QuotaUsageSpecificRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer102 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Name = "" + } else { + x.Name = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MinQueryIndex = 0 + } else { + x.MinQueryIndex = (uint64)(r.DecodeUint64()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MaxQueryTime = 0 + } else { + if false { + } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { + z.DecExtension(x.MaxQueryTime, yyxt20) + } else { + x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AllowStale = false + } else { + x.AllowStale = (bool)(r.DecodeBool()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Prefix = "" + } else { + x.Prefix = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj14-1, "") + } + r.ReadArrayEnd() +} + +func (x *QuotaUsageListResponse) 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.Usages == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoQuotaUsage(([]*QuotaUsage)(x.Usages), e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Usages\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Usages`) + } + r.WriteMapElemValue() + if x.Usages == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoQuotaUsage(([]*QuotaUsage)(x.Usages), 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 *QuotaUsageListResponse) 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 *QuotaUsageListResponse) 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 "Usages": + if r.TryDecodeAsNil() { + x.Usages = nil + } else { + if false { + } else { + h.decSlicePtrtoQuotaUsage((*[]*QuotaUsage)(&x.Usages), 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 *QuotaUsageListResponse) 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.Usages = nil + } else { + if false { + } else { + h.decSlicePtrtoQuotaUsage((*[]*QuotaUsage)(&x.Usages), 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 *SingleQuotaUsageResponse) 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.Usage == nil { + yyn3 = true + goto LABEL3 + } + LABEL3: + if yyr2 || yy2arr2 { + if yyn3 { + r.WriteArrayElem() + r.EncodeNil() + } else { + r.WriteArrayElem() + if x.Usage == nil { + r.EncodeNil() + } else { + x.Usage.CodecEncodeSelf(e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Usage\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8102, `Usage`) + } + r.WriteMapElemValue() + if yyn3 { + r.EncodeNil() + } else { + if x.Usage == nil { + r.EncodeNil() + } else { + x.Usage.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 *SingleQuotaUsageResponse) 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 *SingleQuotaUsageResponse) 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 "Usage": + if r.TryDecodeAsNil() { + if true && x.Usage != nil { + x.Usage = nil + } + } else { + if x.Usage == nil { + x.Usage = new(QuotaUsage) + } + + x.Usage.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 *SingleQuotaUsageResponse) 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.Usage != nil { + x.Usage = nil + } + } else { + if x.Usage == nil { + x.Usage = new(QuotaUsage) + } + + x.Usage.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 codecSelfer102) encSlicePtrtoSentinelPolicyListStub(v []*SentinelPolicyListStub, 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) decSlicePtrtoSentinelPolicyListStub(v *[]*SentinelPolicyListStub, 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 = []*SentinelPolicyListStub{} + 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([]*SentinelPolicyListStub, 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([]*SentinelPolicyListStub, 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(SentinelPolicyListStub) + } + yyv1[yyj1].CodecDecodeSelf(d) + } + + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = make([]*SentinelPolicyListStub, 0) + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer102) encMapstringPtrtoSentinelPolicy(v map[string]*SentinelPolicy, 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) decMapstringPtrtoSentinelPolicy(v *map[string]*SentinelPolicy, 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]*SentinelPolicy, yyrl1) + *v = yyv1 + } + var yymk1 string + var yymv1 *SentinelPolicy + 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(SentinelPolicy) + } + 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) encSlicePtrtoSentinelPolicy(v []*SentinelPolicy, 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) decSlicePtrtoSentinelPolicy(v *[]*SentinelPolicy, 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 = []*SentinelPolicy{} + 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([]*SentinelPolicy, 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([]*SentinelPolicy, 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(SentinelPolicy) + } + yyv1[yyj1].CodecDecodeSelf(d) + } + + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = make([]*SentinelPolicy, 0) + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer102) encSlicePtrtoQuotaLimit(v []*QuotaLimit, 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) decSlicePtrtoQuotaLimit(v *[]*QuotaLimit, 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 = []*QuotaLimit{} + 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([]*QuotaLimit, 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([]*QuotaLimit, 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(QuotaLimit) + } + yyv1[yyj1].CodecDecodeSelf(d) + } + + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = make([]*QuotaLimit, 0) + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer102) encMapstringPtrtoQuotaLimit(v map[string]*QuotaLimit, 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) decMapstringPtrtoQuotaLimit(v *map[string]*QuotaLimit, 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]*QuotaLimit, yyrl1) + *v = yyv1 + } + var yymk1 string + var yymv1 *QuotaLimit + 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(QuotaLimit) + } + 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) encSlicePtrtoQuotaSpec(v []*QuotaSpec, 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) decSlicePtrtoQuotaSpec(v *[]*QuotaSpec, 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 = []*QuotaSpec{} + 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([]*QuotaSpec, 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([]*QuotaSpec, 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(QuotaSpec) + } + yyv1[yyj1].CodecDecodeSelf(d) + } + + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = make([]*QuotaSpec, 0) + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer102) encMapstringPtrtoQuotaSpec(v map[string]*QuotaSpec, 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) decMapstringPtrtoQuotaSpec(v *map[string]*QuotaSpec, 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]*QuotaSpec, yyrl1) + *v = yyv1 + } + var yymk1 string + var yymv1 *QuotaSpec + 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(QuotaSpec) + } + 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) encSlicePtrtoQuotaUsage(v []*QuotaUsage, 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) decSlicePtrtoQuotaUsage(v *[]*QuotaUsage, 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 = []*QuotaUsage{} + 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([]*QuotaUsage, 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([]*QuotaUsage, 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(QuotaUsage) + } + yyv1[yyj1].CodecDecodeSelf(d) + } + + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = make([]*QuotaUsage, 0) + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/nomad/structs/structs_pro.generated.go b/nomad/structs/structs_pro.generated.go new file mode 100644 index 00000000000..25408f3c6f9 --- /dev/null +++ b/nomad/structs/structs_pro.generated.go @@ -0,0 +1,3783 @@ +// +build pro ent + +// Code generated by codecgen - DO NOT EDIT. + +package structs + +import ( + "errors" + codec1978 "github.com/ugorji/go/codec" + "runtime" + "strconv" + "time" +) + +const ( + // ----- content types ---- + codecSelferCcUTF8103 = 1 + codecSelferCcRAW103 = 255 + // ----- value types used ---- + codecSelferValueTypeArray103 = 10 + codecSelferValueTypeMap103 = 9 + codecSelferValueTypeString103 = 6 + codecSelferValueTypeInt103 = 2 + codecSelferValueTypeUint103 = 3 + codecSelferValueTypeFloat103 = 4 + codecSelferBitsize103 = uint8(32 << (^uint(0) >> 63)) +) + +var ( + errCodecSelferOnlyMapOrArrayEncodeToStruct103 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer103 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 time.Duration + _ = v0 + } +} + +func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer103 + 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(codecSelferCcUTF8103, string(x.Name)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Name\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Name`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Name)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Description))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Description)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Description\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Description`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Description))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Description)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Quota))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Quota)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Quota\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Quota`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Quota))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Quota)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Hash == nil { + r.EncodeNil() + } else { + if false { + } else { + r.EncodeStringBytesRaw([]byte(x.Hash)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Hash\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Hash`) + } + r.WriteMapElemValue() + if x.Hash == nil { + r.EncodeNil() + } else { + if false { + } else { + r.EncodeStringBytesRaw([]byte(x.Hash)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + r.EncodeUint(uint64(x.CreateIndex)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"CreateIndex\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `CreateIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.CreateIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + r.EncodeUint(uint64(x.ModifyIndex)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"ModifyIndex\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `ModifyIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.ModifyIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *Namespace) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer103 + 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 == codecSelferValueTypeMap103 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray103 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(errCodecSelferOnlyMapOrArrayEncodeToStruct103) + } + } +} + +func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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 "Description": + if r.TryDecodeAsNil() { + x.Description = "" + } else { + x.Description = (string)(r.DecodeString()) + } + case "Quota": + if r.TryDecodeAsNil() { + x.Quota = "" + } else { + x.Quota = (string)(r.DecodeString()) + } + case "Hash": + if r.TryDecodeAsNil() { + x.Hash = nil + } else { + if false { + } else { + x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) + } + } + case "CreateIndex": + if r.TryDecodeAsNil() { + x.CreateIndex = 0 + } else { + x.CreateIndex = (uint64)(r.DecodeUint64()) + } + case "ModifyIndex": + if r.TryDecodeAsNil() { + x.ModifyIndex = 0 + } else { + x.ModifyIndex = (uint64)(r.DecodeUint64()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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.Description = "" + } else { + x.Description = (string)(r.DecodeString()) + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Quota = "" + } else { + x.Quota = (string)(r.DecodeString()) + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Hash = nil + } else { + if false { + } else { + x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.CreateIndex = 0 + } else { + x.CreateIndex = (uint64)(r.DecodeUint64()) + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.ModifyIndex = 0 + } else { + x.ModifyIndex = (uint64)(r.DecodeUint64()) + } + for { + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj11-1, "") + } + r.ReadArrayEnd() +} + +func (x *NamespaceListRequest) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer103 + 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 { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Region)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Region\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Region`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, 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(codecSelferCcUTF8103, string(x.Namespace)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Namespace\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Namespace`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, 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(codecSelferCcUTF8103, `MinQueryIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.MinQueryIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { + z.EncExtension(x.MaxQueryTime, yyxt13) + } else { + r.EncodeInt(int64(x.MaxQueryTime)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"MaxQueryTime\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `MaxQueryTime`) + } + r.WriteMapElemValue() + if false { + } else if yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { + z.EncExtension(x.MaxQueryTime, yyxt14) + } 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(codecSelferCcUTF8103, `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(codecSelferCcUTF8103, string(x.Prefix)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Prefix\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Prefix`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, 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(codecSelferCcUTF8103, string(x.AuthToken)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"AuthToken\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `AuthToken`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.AuthToken)) + } + } + } + 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(codecSelferCcUTF8103, `Forwarded`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeBool(bool(x.Forwarded)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *NamespaceListRequest) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer103 + 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 == codecSelferValueTypeMap103 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray103 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(errCodecSelferOnlyMapOrArrayEncodeToStruct103) + } + } +} + +func (x *NamespaceListRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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 "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 yyxt8 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt8 != nil { + z.DecExtension(x.MaxQueryTime, yyxt8) + } 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 "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 *NamespaceListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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.QueryOptions.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MinQueryIndex = 0 + } else { + x.MinQueryIndex = (uint64)(r.DecodeUint64()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MaxQueryTime = 0 + } else { + if false { + } else if yyxt18 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt18 != nil { + z.DecExtension(x.MaxQueryTime, yyxt18) + } else { + x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AllowStale = false + } else { + x.AllowStale = (bool)(r.DecodeBool()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Prefix = "" + } else { + x.Prefix = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj13-1, "") + } + r.ReadArrayEnd() +} + +func (x *NamespaceListResponse) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer103 + 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.Namespaces == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoNamespace(([]*Namespace)(x.Namespaces), e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Namespaces\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Namespaces`) + } + r.WriteMapElemValue() + if x.Namespaces == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoNamespace(([]*Namespace)(x.Namespaces), 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(codecSelferCcUTF8103, `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(codecSelferCcUTF8103, `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(codecSelferCcUTF8103, `KnownLeader`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeBool(bool(x.KnownLeader)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *NamespaceListResponse) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer103 + 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 == codecSelferValueTypeMap103 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray103 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(errCodecSelferOnlyMapOrArrayEncodeToStruct103) + } + } +} + +func (x *NamespaceListResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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 "Namespaces": + if r.TryDecodeAsNil() { + x.Namespaces = nil + } else { + if false { + } else { + h.decSlicePtrtoNamespace((*[]*Namespace)(&x.Namespaces), 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 *NamespaceListResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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.Namespaces = nil + } else { + if false { + } else { + h.decSlicePtrtoNamespace((*[]*Namespace)(&x.Namespaces), 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 *NamespaceSpecificRequest) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer103 + 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(9) + } else { + r.WriteMapStart(9) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Name)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Name\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Name`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Name)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Region)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Region\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Region`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, 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(codecSelferCcUTF8103, string(x.Namespace)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Namespace\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Namespace`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, 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(codecSelferCcUTF8103, `MinQueryIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.MinQueryIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { + z.EncExtension(x.MaxQueryTime, yyxt16) + } else { + r.EncodeInt(int64(x.MaxQueryTime)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"MaxQueryTime\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `MaxQueryTime`) + } + r.WriteMapElemValue() + if false { + } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { + z.EncExtension(x.MaxQueryTime, yyxt17) + } 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(codecSelferCcUTF8103, `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(codecSelferCcUTF8103, string(x.Prefix)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Prefix\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Prefix`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, 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(codecSelferCcUTF8103, string(x.AuthToken)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"AuthToken\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `AuthToken`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.AuthToken)) + } + } + } + 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(codecSelferCcUTF8103, `Forwarded`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeBool(bool(x.Forwarded)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *NamespaceSpecificRequest) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer103 + 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 == codecSelferValueTypeMap103 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray103 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(errCodecSelferOnlyMapOrArrayEncodeToStruct103) + } + } +} + +func (x *NamespaceSpecificRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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 "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 yyxt9 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt9 != nil { + z.DecExtension(x.MaxQueryTime, yyxt9) + } 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 "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 *NamespaceSpecificRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer103 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Name = "" + } else { + x.Name = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MinQueryIndex = 0 + } else { + x.MinQueryIndex = (uint64)(r.DecodeUint64()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MaxQueryTime = 0 + } else { + if false { + } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { + z.DecExtension(x.MaxQueryTime, yyxt20) + } else { + x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AllowStale = false + } else { + x.AllowStale = (bool)(r.DecodeBool()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Prefix = "" + } else { + x.Prefix = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj14-1, "") + } + r.ReadArrayEnd() +} + +func (x *SingleNamespaceResponse) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer103 + 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.Namespace == nil { + yyn3 = true + goto LABEL3 + } + LABEL3: + if yyr2 || yy2arr2 { + if yyn3 { + r.WriteArrayElem() + r.EncodeNil() + } else { + r.WriteArrayElem() + if x.Namespace == nil { + r.EncodeNil() + } else { + x.Namespace.CodecEncodeSelf(e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Namespace\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Namespace`) + } + r.WriteMapElemValue() + if yyn3 { + r.EncodeNil() + } else { + if x.Namespace == nil { + r.EncodeNil() + } else { + x.Namespace.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(codecSelferCcUTF8103, `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(codecSelferCcUTF8103, `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(codecSelferCcUTF8103, `KnownLeader`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeBool(bool(x.KnownLeader)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *SingleNamespaceResponse) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer103 + 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 == codecSelferValueTypeMap103 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray103 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(errCodecSelferOnlyMapOrArrayEncodeToStruct103) + } + } +} + +func (x *SingleNamespaceResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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 "Namespace": + if r.TryDecodeAsNil() { + if true && x.Namespace != nil { + x.Namespace = nil + } + } else { + if x.Namespace == nil { + x.Namespace = new(Namespace) + } + + x.Namespace.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 *SingleNamespaceResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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.Namespace != nil { + x.Namespace = nil + } + } else { + if x.Namespace == nil { + x.Namespace = new(Namespace) + } + + x.Namespace.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 *NamespaceSetRequest) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer103 + 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(9) + } else { + r.WriteMapStart(9) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Namespaces == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncSliceStringV(x.Namespaces, e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Namespaces\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Namespaces`) + } + r.WriteMapElemValue() + if x.Namespaces == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncSliceStringV(x.Namespaces, e) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Region)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Region\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Region`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, 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(codecSelferCcUTF8103, string(x.Namespace)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Namespace\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Namespace`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, 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(codecSelferCcUTF8103, `MinQueryIndex`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeUint(uint64(x.MinQueryIndex)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { + z.EncExtension(x.MaxQueryTime, yyxt16) + } else { + r.EncodeInt(int64(x.MaxQueryTime)) + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"MaxQueryTime\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `MaxQueryTime`) + } + r.WriteMapElemValue() + if false { + } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { + z.EncExtension(x.MaxQueryTime, yyxt17) + } 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(codecSelferCcUTF8103, `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(codecSelferCcUTF8103, string(x.Prefix)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Prefix\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Prefix`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, 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(codecSelferCcUTF8103, string(x.AuthToken)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"AuthToken\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `AuthToken`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.AuthToken)) + } + } + } + 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(codecSelferCcUTF8103, `Forwarded`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeBool(bool(x.Forwarded)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *NamespaceSetRequest) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer103 + 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 == codecSelferValueTypeMap103 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray103 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(errCodecSelferOnlyMapOrArrayEncodeToStruct103) + } + } +} + +func (x *NamespaceSetRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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 "Namespaces": + if r.TryDecodeAsNil() { + x.Namespaces = nil + } else { + if false { + } else { + z.F.DecSliceStringX(&x.Namespaces, 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 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 "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 *NamespaceSetRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer103 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj15 int + var yyb15 bool + var yyhl15 bool = l >= 0 + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.Namespaces = nil + } else { + if false { + } else { + z.F.DecSliceStringX(&x.Namespaces, d) + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MinQueryIndex = 0 + } else { + x.MinQueryIndex = (uint64)(r.DecodeUint64()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.MaxQueryTime = 0 + } else { + if false { + } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { + z.DecExtension(x.MaxQueryTime, yyxt22) + } else { + x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) + } + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AllowStale = false + } else { + x.AllowStale = (bool)(r.DecodeBool()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.Prefix = "" + } else { + x.Prefix = (string)(r.DecodeString()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.QueryOptions.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + for { + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l + } else { + yyb15 = r.CheckBreak() + } + if yyb15 { + break + } + r.ReadArrayElem() + z.DecStructFieldNotFound(yyj15-1, "") + } + r.ReadArrayEnd() +} + +func (x *NamespaceSetResponse) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer103 + 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.Namespaces == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encMapstringPtrtoNamespace((map[string]*Namespace)(x.Namespaces), e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Namespaces\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Namespaces`) + } + r.WriteMapElemValue() + if x.Namespaces == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encMapstringPtrtoNamespace((map[string]*Namespace)(x.Namespaces), 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(codecSelferCcUTF8103, `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(codecSelferCcUTF8103, `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(codecSelferCcUTF8103, `KnownLeader`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeBool(bool(x.KnownLeader)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *NamespaceSetResponse) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer103 + 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 == codecSelferValueTypeMap103 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray103 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(errCodecSelferOnlyMapOrArrayEncodeToStruct103) + } + } +} + +func (x *NamespaceSetResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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 "Namespaces": + if r.TryDecodeAsNil() { + x.Namespaces = nil + } else { + if false { + } else { + h.decMapstringPtrtoNamespace((*map[string]*Namespace)(&x.Namespaces), 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 *NamespaceSetResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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.Namespaces = nil + } else { + if false { + } else { + h.decMapstringPtrtoNamespace((*map[string]*Namespace)(&x.Namespaces), 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 *NamespaceDeleteRequest) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer103 + 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(5) + } else { + r.WriteMapStart(5) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Namespaces == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncSliceStringV(x.Namespaces, e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Namespaces\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Namespaces`) + } + r.WriteMapElemValue() + if x.Namespaces == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncSliceStringV(x.Namespaces, e) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Region)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Region\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Region`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, 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(codecSelferCcUTF8103, string(x.Namespace)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Namespace\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Namespace`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Namespace)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.AuthToken)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"AuthToken\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `AuthToken`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.AuthToken)) + } + } + } + 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(codecSelferCcUTF8103, `Forwarded`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeBool(bool(x.Forwarded)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *NamespaceDeleteRequest) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer103 + 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 == codecSelferValueTypeMap103 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray103 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(errCodecSelferOnlyMapOrArrayEncodeToStruct103) + } + } +} + +func (x *NamespaceDeleteRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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 "Namespaces": + if r.TryDecodeAsNil() { + x.Namespaces = nil + } else { + if false { + } else { + z.F.DecSliceStringX(&x.Namespaces, d) + } + } + case "Region": + if r.TryDecodeAsNil() { + x.WriteRequest.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + case "Namespace": + if r.TryDecodeAsNil() { + x.WriteRequest.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + case "AuthToken": + if r.TryDecodeAsNil() { + x.WriteRequest.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + case "Forwarded": + if r.TryDecodeAsNil() { + x.WriteRequest.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *NamespaceDeleteRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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.Namespaces = nil + } else { + if false { + } else { + z.F.DecSliceStringX(&x.Namespaces, d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (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 *NamespaceUpsertRequest) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer103 + 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(5) + } else { + r.WriteMapStart(5) + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.Namespaces == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoNamespace(([]*Namespace)(x.Namespaces), e) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Namespaces\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Namespaces`) + } + r.WriteMapElemValue() + if x.Namespaces == nil { + r.EncodeNil() + } else { + if false { + } else { + h.encSlicePtrtoNamespace(([]*Namespace)(x.Namespaces), e) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Region)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Region\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Region`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, 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(codecSelferCcUTF8103, string(x.Namespace)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"Namespace\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `Namespace`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.Namespace)) + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.AuthToken)) + } + } + } else { + r.WriteMapElemKey() + if z.IsJSONHandle() { + z.WriteStr("\"AuthToken\"") + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, `AuthToken`) + } + r.WriteMapElemValue() + if false { + } else { + if z.EncBasicHandle().StringToRaw { + r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) + } else { + r.EncodeStringEnc(codecSelferCcUTF8103, string(x.AuthToken)) + } + } + } + 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(codecSelferCcUTF8103, `Forwarded`) + } + r.WriteMapElemValue() + if false { + } else { + r.EncodeBool(bool(x.Forwarded)) + } + } + if yyr2 || yy2arr2 { + r.WriteArrayEnd() + } else { + r.WriteMapEnd() + } + } + } +} + +func (x *NamespaceUpsertRequest) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer103 + 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 == codecSelferValueTypeMap103 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + r.ReadMapEnd() + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray103 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + r.ReadArrayEnd() + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(errCodecSelferOnlyMapOrArrayEncodeToStruct103) + } + } +} + +func (x *NamespaceUpsertRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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 "Namespaces": + if r.TryDecodeAsNil() { + x.Namespaces = nil + } else { + if false { + } else { + h.decSlicePtrtoNamespace((*[]*Namespace)(&x.Namespaces), d) + } + } + case "Region": + if r.TryDecodeAsNil() { + x.WriteRequest.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + case "Namespace": + if r.TryDecodeAsNil() { + x.WriteRequest.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + case "AuthToken": + if r.TryDecodeAsNil() { + x.WriteRequest.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + case "Forwarded": + if r.TryDecodeAsNil() { + x.WriteRequest.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (bool)(r.DecodeBool()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + r.ReadMapEnd() +} + +func (x *NamespaceUpsertRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer103 + 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.Namespaces = nil + } else { + if false { + } else { + h.decSlicePtrtoNamespace((*[]*Namespace)(&x.Namespaces), d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.Region = "" + } else { + x.Region = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.Namespace = "" + } else { + x.Namespace = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.AuthToken = "" + } else { + x.AuthToken = (string)(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.WriteRequest.InternalRpcInfo.Forwarded = false + } else { + x.Forwarded = (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 codecSelfer103) encSlicePtrtoNamespace(v []*Namespace, e *codec1978.Encoder) { + var h codecSelfer103 + 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 codecSelfer103) decSlicePtrtoNamespace(v *[]*Namespace, d *codec1978.Decoder) { + var h codecSelfer103 + 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 = []*Namespace{} + 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([]*Namespace, 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([]*Namespace, 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(Namespace) + } + yyv1[yyj1].CodecDecodeSelf(d) + } + + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = make([]*Namespace, 0) + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer103) encMapstringPtrtoNamespace(v map[string]*Namespace, e *codec1978.Encoder) { + var h codecSelfer103 + 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(codecSelferCcUTF8103, string(yyk1)) + } + } + r.WriteMapElemValue() + if yyv1 == nil { + r.EncodeNil() + } else { + yyv1.CodecEncodeSelf(e) + } + } + r.WriteMapEnd() +} + +func (x codecSelfer103) decMapstringPtrtoNamespace(v *map[string]*Namespace, d *codec1978.Decoder) { + var h codecSelfer103 + 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]*Namespace, yyrl1) + *v = yyv1 + } + var yymk1 string + var yymv1 *Namespace + 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(Namespace) + } + 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() +}