diff --git a/glide.lock b/glide.lock index 0dfac2281..4c85367b7 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: ba5b236a5229df0969934136a3a889d5dc3282d7bd3d4824be81b4979ccf036c -updated: 2017-09-26T06:37:50.008911843-07:00 +hash: a6174915dbdf89b5e816471ee69a15f26e4a8f47280b87a1ee8e9177aebadb5e +updated: 2017-10-04T04:04:09.082076992-07:00 imports: - name: cloud.google.com/go version: fe3d41e1ecb2ce36ad3a979037c9b9a2b726226f @@ -219,7 +219,7 @@ imports: - name: github.com/juju/ratelimit version: 5b9ff866471762aa2ab2dced63c9fb6f53921342 - name: github.com/k8sdb/apimachinery - version: 1ece8bca55eb5055292bd661dc0f2b0505f9055a + version: 0e3d121b918e01522c0809be27d642b6d9b986bc subpackages: - apis/kubedb - apis/kubedb/v1alpha1 @@ -229,11 +229,11 @@ imports: - pkg/storage - pkg/validator - name: github.com/k8sdb/elasticsearch - version: 80ece724ad240b95aa17e1f9742afa46db31fffe + version: 7cdad4658fb6190eefbda2a028afbeab3c1aa381 subpackages: - pkg/validator - name: github.com/k8sdb/postgres - version: aea5bd852349de3dcd3d6205382fe780deb9d06f + version: 092ef007d992ce50152667652a213989bd6b427e subpackages: - pkg/validator - name: github.com/mailru/easyjson @@ -292,11 +292,11 @@ imports: - name: github.com/Sirupsen/logrus version: 4b6ea7319e214d98c938f12692336f7ca9348d6b - name: github.com/spf13/cobra - version: b78744579491c1ceeaaa3b40205e56b0591b93a3 + version: 0dacccfbaabc71b872087c1719c5380d3e185173 subpackages: - doc - name: github.com/spf13/pflag - version: 7aff26db30c1be810f9de5038ec5ef96ac41fd7c + version: be7121dd7a937a85e1e4b1ddda6a3edce3466110 - name: github.com/ugorji/go version: ded73eae5db7e7a0ef6f55aace87a2873c5d2b74 subpackages: @@ -352,7 +352,7 @@ imports: - unicode/norm - width - name: google.golang.org/api - version: cec5cc05d57604ba2d2eaaf5381d3248fac4814d + version: 406e6cffe51212e465c56554f243c115595e135a subpackages: - gensupport - googleapi @@ -541,7 +541,7 @@ imports: - util/jsonpath - util/workqueue - name: k8s.io/kubernetes - version: 4bc5e7f9a6c25dc4c03d4d656f2cefd21540e28c + version: 8e1552342355496b62754e61ad5f802a0f3f1fa7 subpackages: - cmd/kubeadm/app/apis/kubeadm - federation/apis/federation diff --git a/glide.yaml b/glide.yaml index 349827fee..06231d809 100644 --- a/glide.yaml +++ b/glide.yaml @@ -11,9 +11,9 @@ import: - package: github.com/k8sdb/apimachinery version: release-0.7 - package: github.com/k8sdb/elasticsearch - version: master + version: 0.7.1 - package: github.com/k8sdb/postgres - version: master + version: 0.7.1 - package: k8s.io/kubernetes version: ~1.7 - package: k8s.io/metrics diff --git a/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/dormant_database_types.generated.go b/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/dormant_database_types.generated.go new file mode 100644 index 000000000..86622b236 --- /dev/null +++ b/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/dormant_database_types.generated.go @@ -0,0 +1,2226 @@ +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1alpha1 + +import ( + "errors" + "fmt" + "reflect" + "runtime" + time "time" + + pkg3_types "github.com/appscode/go/encoding/json/types" + codec1978 "github.com/ugorji/go/codec" + pkg5_resource "k8s.io/apimachinery/pkg/api/resource" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + pkg4_v1 "k8s.io/client-go/pkg/api/v1" +) + +const ( + // ----- content types ---- + codecSelferC_UTF85179 = 1 + codecSelferC_RAW5179 = 0 + // ----- value types used ---- + codecSelferValueTypeArray5179 = 10 + codecSelferValueTypeMap5179 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey5179 = 2 + codecSelfer_containerMapValue5179 = 3 + codecSelfer_containerMapEnd5179 = 4 + codecSelfer_containerArrayElem5179 = 6 + codecSelfer_containerArrayEnd5179 = 7 +) + +var ( + codecSelferBitsize5179 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr5179 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer5179 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg3_types.StrYo + var v1 pkg5_resource.Quantity + var v2 pkg1_v1.TypeMeta + var v3 pkg2_types.UID + var v4 pkg4_v1.PersistentVolumeClaimSpec + var v5 time.Time + _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 + } +} + +func (x *DormantDatabase) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF85179, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF85179, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF85179, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF85179, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF85179, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF85179, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd5179) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd5179) + } + } + } +} + +func (x *DormantDatabase) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap5179 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd5179) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray5179 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr5179) + } + } +} + +func (x *DormantDatabase) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey5179) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue5179) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = DormantDatabaseSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = DormantDatabaseStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd5179) +} + +func (x *DormantDatabase) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer5179 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.Spec = DormantDatabaseSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.Status = DormantDatabaseStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) +} + +func (x *DormantDatabaseSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.WipeOut != false + yyq2[1] = x.Resume != false + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeBool(bool(x.WipeOut)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("wipeOut")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeBool(bool(x.WipeOut)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeBool(bool(x.Resume)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("resume")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeBool(bool(x.Resume)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[2] { + yy10 := &x.Origin + yy10.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("origin")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yy12 := &x.Origin + yy12.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd5179) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd5179) + } + } + } +} + +func (x *DormantDatabaseSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap5179 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd5179) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray5179 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr5179) + } + } +} + +func (x *DormantDatabaseSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey5179) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue5179) + switch yys3 { + case "wipeOut": + if r.TryDecodeAsNil() { + x.WipeOut = false + } else { + yyv4 := &x.WipeOut + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*bool)(yyv4)) = r.DecodeBool() + } + } + case "resume": + if r.TryDecodeAsNil() { + x.Resume = false + } else { + yyv6 := &x.Resume + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*bool)(yyv6)) = r.DecodeBool() + } + } + case "origin": + if r.TryDecodeAsNil() { + x.Origin = Origin{} + } else { + yyv8 := &x.Origin + yyv8.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd5179) +} + +func (x *DormantDatabaseSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer5179 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.WipeOut = false + } else { + yyv10 := &x.WipeOut + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(yyv10)) = r.DecodeBool() + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.Resume = false + } else { + yyv12 := &x.Resume + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*bool)(yyv12)) = r.DecodeBool() + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.Origin = Origin{} + } else { + yyv14 := &x.Origin + yyv14.CodecDecodeSelf(d) + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) +} + +func (x *Origin) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = true + yyq2[1] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[0] { + yy4 := &x.ObjectMeta + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(yy4) { + } else { + z.EncFallback(yy4) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yy6 := &x.ObjectMeta + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(yy6) { + } else { + z.EncFallback(yy6) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[1] { + yy9 := &x.Spec + yy9.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yy11 := &x.Spec + yy11.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd5179) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd5179) + } + } + } +} + +func (x *Origin) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap5179 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd5179) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray5179 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr5179) + } + } +} + +func (x *Origin) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey5179) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue5179) + switch yys3 { + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv4 := &x.ObjectMeta + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + z.DecFallback(yyv4, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = OriginSpec{} + } else { + yyv6 := &x.Spec + yyv6.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd5179) +} + +func (x *Origin) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.Spec = OriginSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + for { + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + z.DecStructFieldNotFound(yyj7-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) +} + +func (x *OriginSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Elasticsearch != nil + yyq2[1] = x.Postgres != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[0] { + if x.Elasticsearch == nil { + r.EncodeNil() + } else { + x.Elasticsearch.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("elasticsearch")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + if x.Elasticsearch == nil { + r.EncodeNil() + } else { + x.Elasticsearch.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[1] { + if x.Postgres == nil { + r.EncodeNil() + } else { + x.Postgres.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("postgres")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + if x.Postgres == nil { + r.EncodeNil() + } else { + x.Postgres.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd5179) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd5179) + } + } + } +} + +func (x *OriginSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap5179 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd5179) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray5179 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr5179) + } + } +} + +func (x *OriginSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey5179) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue5179) + switch yys3 { + case "elasticsearch": + if r.TryDecodeAsNil() { + if x.Elasticsearch != nil { + x.Elasticsearch = nil + } + } else { + if x.Elasticsearch == nil { + x.Elasticsearch = new(ElasticsearchSpec) + } + x.Elasticsearch.CodecDecodeSelf(d) + } + case "postgres": + if r.TryDecodeAsNil() { + if x.Postgres != nil { + x.Postgres = nil + } + } else { + if x.Postgres == nil { + x.Postgres = new(PostgresSpec) + } + x.Postgres.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd5179) +} + +func (x *OriginSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + if x.Elasticsearch != nil { + x.Elasticsearch = nil + } + } else { + if x.Elasticsearch == nil { + x.Elasticsearch = new(ElasticsearchSpec) + } + x.Elasticsearch.CodecDecodeSelf(d) + } + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + if x.Postgres != nil { + x.Postgres = nil + } + } else { + if x.Postgres == nil { + x.Postgres = new(PostgresSpec) + } + x.Postgres.CodecDecodeSelf(d) + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) +} + +func (x DormantDatabasePhase) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF85179, string(x)) + } +} + +func (x *DormantDatabasePhase) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *DormantDatabaseStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.CreationTime != nil + yyq2[1] = x.PausingTime != nil + yyq2[2] = x.WipeOutTime != nil + yyq2[3] = x.Phase != "" + yyq2[4] = x.Reason != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[0] { + if x.CreationTime == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else if z.HasExtensions() && z.EncExt(x.CreationTime) { + } else if yym4 { + z.EncBinaryMarshal(x.CreationTime) + } else if !yym4 && z.IsJSONHandle() { + z.EncJSONMarshal(x.CreationTime) + } else { + z.EncFallback(x.CreationTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("creationTime")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + if x.CreationTime == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(x.CreationTime) { + } else if yym5 { + z.EncBinaryMarshal(x.CreationTime) + } else if !yym5 && z.IsJSONHandle() { + z.EncJSONMarshal(x.CreationTime) + } else { + z.EncFallback(x.CreationTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[1] { + if x.PausingTime == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(x.PausingTime) { + } else if yym7 { + z.EncBinaryMarshal(x.PausingTime) + } else if !yym7 && z.IsJSONHandle() { + z.EncJSONMarshal(x.PausingTime) + } else { + z.EncFallback(x.PausingTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("pausingTime")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + if x.PausingTime == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.EncExt(x.PausingTime) { + } else if yym8 { + z.EncBinaryMarshal(x.PausingTime) + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(x.PausingTime) + } else { + z.EncFallback(x.PausingTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[2] { + if x.WipeOutTime == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else if z.HasExtensions() && z.EncExt(x.WipeOutTime) { + } else if yym10 { + z.EncBinaryMarshal(x.WipeOutTime) + } else if !yym10 && z.IsJSONHandle() { + z.EncJSONMarshal(x.WipeOutTime) + } else { + z.EncFallback(x.WipeOutTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("wipeOutTime")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + if x.WipeOutTime == nil { + r.EncodeNil() + } else { + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(x.WipeOutTime) { + } else if yym11 { + z.EncBinaryMarshal(x.WipeOutTime) + } else if !yym11 && z.IsJSONHandle() { + z.EncJSONMarshal(x.WipeOutTime) + } else { + z.EncFallback(x.WipeOutTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[3] { + x.Phase.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF85179, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("phase")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + x.Phase.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[4] { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeString(codecSelferC_UTF85179, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF85179, "") + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + r.EncodeString(codecSelferC_UTF85179, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd5179) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd5179) + } + } + } +} + +func (x *DormantDatabaseStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap5179 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd5179) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray5179 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr5179) + } + } +} + +func (x *DormantDatabaseStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey5179) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue5179) + switch yys3 { + case "creationTime": + if r.TryDecodeAsNil() { + if x.CreationTime != nil { + x.CreationTime = nil + } + } else { + if x.CreationTime == nil { + x.CreationTime = new(pkg1_v1.Time) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(x.CreationTime) { + } else if yym5 { + z.DecBinaryUnmarshal(x.CreationTime) + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.CreationTime) + } else { + z.DecFallback(x.CreationTime, false) + } + } + case "pausingTime": + if r.TryDecodeAsNil() { + if x.PausingTime != nil { + x.PausingTime = nil + } + } else { + if x.PausingTime == nil { + x.PausingTime = new(pkg1_v1.Time) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(x.PausingTime) { + } else if yym7 { + z.DecBinaryUnmarshal(x.PausingTime) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.PausingTime) + } else { + z.DecFallback(x.PausingTime, false) + } + } + case "wipeOutTime": + if r.TryDecodeAsNil() { + if x.WipeOutTime != nil { + x.WipeOutTime = nil + } + } else { + if x.WipeOutTime == nil { + x.WipeOutTime = new(pkg1_v1.Time) + } + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(x.WipeOutTime) { + } else if yym9 { + z.DecBinaryUnmarshal(x.WipeOutTime) + } else if !yym9 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.WipeOutTime) + } else { + z.DecFallback(x.WipeOutTime, false) + } + } + case "phase": + if r.TryDecodeAsNil() { + x.Phase = "" + } else { + yyv10 := &x.Phase + yyv10.CodecDecodeSelf(d) + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv11 := &x.Reason + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd5179) +} + +func (x *DormantDatabaseStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer5179 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + if x.CreationTime != nil { + x.CreationTime = nil + } + } else { + if x.CreationTime == nil { + x.CreationTime = new(pkg1_v1.Time) + } + yym15 := z.DecBinary() + _ = yym15 + if false { + } else if z.HasExtensions() && z.DecExt(x.CreationTime) { + } else if yym15 { + z.DecBinaryUnmarshal(x.CreationTime) + } else if !yym15 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.CreationTime) + } else { + z.DecFallback(x.CreationTime, false) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + if x.PausingTime != nil { + x.PausingTime = nil + } + } else { + if x.PausingTime == nil { + x.PausingTime = new(pkg1_v1.Time) + } + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(x.PausingTime) { + } else if yym17 { + z.DecBinaryUnmarshal(x.PausingTime) + } else if !yym17 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.PausingTime) + } else { + z.DecFallback(x.PausingTime, false) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + if x.WipeOutTime != nil { + x.WipeOutTime = nil + } + } else { + if x.WipeOutTime == nil { + x.WipeOutTime = new(pkg1_v1.Time) + } + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(x.WipeOutTime) { + } else if yym19 { + z.DecBinaryUnmarshal(x.WipeOutTime) + } else if !yym19 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.WipeOutTime) + } else { + z.DecFallback(x.WipeOutTime, false) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.Phase = "" + } else { + yyv20 := &x.Phase + yyv20.CodecDecodeSelf(d) + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv21 := &x.Reason + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + *((*string)(yyv21)) = r.DecodeString() + } + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + z.DecStructFieldNotFound(yyj13-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) +} + +func (x *DormantDatabaseList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = len(x.Items) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF85179, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF85179, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF85179, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF85179, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF85179, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF85179, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + if yyq2[3] { + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceDormantDatabase(([]DormantDatabase)(x.Items), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey5179) + r.EncodeString(codecSelferC_UTF85179, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue5179) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceDormantDatabase(([]DormantDatabase)(x.Items), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd5179) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd5179) + } + } + } +} + +func (x *DormantDatabaseList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap5179 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd5179) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray5179 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr5179) + } + } +} + +func (x *DormantDatabaseList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey5179) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue5179) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceDormantDatabase((*[]DormantDatabase)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd5179) +} + +func (x *DormantDatabaseList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer5179 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceDormantDatabase((*[]DormantDatabase)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem5179) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd5179) +} + +func (x codecSelfer5179) encSliceDormantDatabase(v []DormantDatabase, e *codec1978.Encoder) { + var h codecSelfer5179 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem5179) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd5179) +} + +func (x codecSelfer5179) decSliceDormantDatabase(v *[]DormantDatabase, d *codec1978.Decoder) { + var h codecSelfer5179 + 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 = []DormantDatabase{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 576) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]DormantDatabase, yyrl1) + } + } else { + yyv1 = make([]DormantDatabase, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = DormantDatabase{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, DormantDatabase{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = DormantDatabase{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, DormantDatabase{}) // var yyz1 DormantDatabase + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = DormantDatabase{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []DormantDatabase{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/elasticsearch_types.generated.go b/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/elasticsearch_types.generated.go new file mode 100644 index 000000000..ba347093b --- /dev/null +++ b/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/elasticsearch_types.generated.go @@ -0,0 +1,2515 @@ +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1alpha1 + +import ( + "errors" + "fmt" + "reflect" + "runtime" + time "time" + + pkg3_types "github.com/appscode/go/encoding/json/types" + codec1978 "github.com/ugorji/go/codec" + pkg5_resource "k8s.io/apimachinery/pkg/api/resource" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + pkg4_v1 "k8s.io/client-go/pkg/api/v1" +) + +const ( + // ----- content types ---- + codecSelferC_UTF89675 = 1 + codecSelferC_RAW9675 = 0 + // ----- value types used ---- + codecSelferValueTypeArray9675 = 10 + codecSelferValueTypeMap9675 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey9675 = 2 + codecSelfer_containerMapValue9675 = 3 + codecSelfer_containerMapEnd9675 = 4 + codecSelfer_containerArrayElem9675 = 6 + codecSelfer_containerArrayEnd9675 = 7 +) + +var ( + codecSelferBitsize9675 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr9675 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer9675 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg3_types.StrYo + var v1 pkg5_resource.Quantity + var v2 pkg1_v1.TypeMeta + var v3 pkg2_types.UID + var v4 pkg4_v1.PersistentVolumeClaimSpec + var v5 time.Time + _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 + } +} + +func (x *Elasticsearch) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF89675, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF89675, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd9675) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd9675) + } + } + } +} + +func (x *Elasticsearch) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap9675 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd9675) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray9675 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr9675) + } + } +} + +func (x *Elasticsearch) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey9675) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue9675) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = ElasticsearchSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = ElasticsearchStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd9675) +} + +func (x *Elasticsearch) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer9675 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Spec = ElasticsearchSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Status = ElasticsearchStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) +} + +func (x *ElasticsearchSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [12]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Version != "" + yyq2[1] = x.Replicas != 0 + yyq2[2] = x.Storage != nil + yyq2[3] = len(x.NodeSelector) != 0 + yyq2[4] = x.Init != nil + yyq2[5] = x.BackupSchedule != nil + yyq2[6] = x.DoNotPause != false + yyq2[7] = x.Monitor != nil + yyq2[8] = true + yyq2[9] = x.Affinity != nil + yyq2[10] = x.SchedulerName != "" + yyq2[11] = len(x.Tolerations) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(12) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else if z.HasExtensions() && z.EncExt(x.Version) { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.Version)) + } + } else { + r.EncodeString(codecSelferC_UTF89675, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("version")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(x.Version) { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.Version)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("replicas")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeInt(int64(x.Replicas)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[2] { + if x.Storage == nil { + r.EncodeNil() + } else { + x.Storage.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("storage")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + if x.Storage == nil { + r.EncodeNil() + } else { + x.Storage.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[3] { + if x.NodeSelector == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + z.F.EncMapStringStringV(x.NodeSelector, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("nodeSelector")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + if x.NodeSelector == nil { + r.EncodeNil() + } else { + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + z.F.EncMapStringStringV(x.NodeSelector, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[4] { + if x.Init == nil { + r.EncodeNil() + } else { + x.Init.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("init")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + if x.Init == nil { + r.EncodeNil() + } else { + x.Init.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[5] { + if x.BackupSchedule == nil { + r.EncodeNil() + } else { + x.BackupSchedule.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("backupSchedule")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + if x.BackupSchedule == nil { + r.EncodeNil() + } else { + x.BackupSchedule.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[6] { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeBool(bool(x.DoNotPause)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("doNotPause")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeBool(bool(x.DoNotPause)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[7] { + if x.Monitor == nil { + r.EncodeNil() + } else { + x.Monitor.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[7] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("monitor")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + if x.Monitor == nil { + r.EncodeNil() + } else { + x.Monitor.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[8] { + yy28 := &x.Resources + yy28.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[8] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("resources")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yy30 := &x.Resources + yy30.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[9] { + if x.Affinity == nil { + r.EncodeNil() + } else { + x.Affinity.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[9] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("affinity")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + if x.Affinity == nil { + r.EncodeNil() + } else { + x.Affinity.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[10] { + yym36 := z.EncBinary() + _ = yym36 + if false { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.SchedulerName)) + } + } else { + r.EncodeString(codecSelferC_UTF89675, "") + } + } else { + if yyq2[10] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("schedulerName")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yym37 := z.EncBinary() + _ = yym37 + if false { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.SchedulerName)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[11] { + if x.Tolerations == nil { + r.EncodeNil() + } else { + yym39 := z.EncBinary() + _ = yym39 + if false { + } else { + h.encSlicev1_Toleration(([]pkg4_v1.Toleration)(x.Tolerations), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[11] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("tolerations")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + if x.Tolerations == nil { + r.EncodeNil() + } else { + yym40 := z.EncBinary() + _ = yym40 + if false { + } else { + h.encSlicev1_Toleration(([]pkg4_v1.Toleration)(x.Tolerations), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd9675) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd9675) + } + } + } +} + +func (x *ElasticsearchSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap9675 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd9675) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray9675 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr9675) + } + } +} + +func (x *ElasticsearchSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey9675) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue9675) + switch yys3 { + case "version": + if r.TryDecodeAsNil() { + x.Version = "" + } else { + yyv4 := &x.Version + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4) + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "replicas": + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv6 := &x.Replicas + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int32)(yyv6)) = int32(r.DecodeInt(32)) + } + } + case "storage": + if r.TryDecodeAsNil() { + if x.Storage != nil { + x.Storage = nil + } + } else { + if x.Storage == nil { + x.Storage = new(pkg4_v1.PersistentVolumeClaimSpec) + } + x.Storage.CodecDecodeSelf(d) + } + case "nodeSelector": + if r.TryDecodeAsNil() { + x.NodeSelector = nil + } else { + yyv9 := &x.NodeSelector + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + z.F.DecMapStringStringX(yyv9, false, d) + } + } + case "init": + if r.TryDecodeAsNil() { + if x.Init != nil { + x.Init = nil + } + } else { + if x.Init == nil { + x.Init = new(InitSpec) + } + x.Init.CodecDecodeSelf(d) + } + case "backupSchedule": + if r.TryDecodeAsNil() { + if x.BackupSchedule != nil { + x.BackupSchedule = nil + } + } else { + if x.BackupSchedule == nil { + x.BackupSchedule = new(BackupScheduleSpec) + } + x.BackupSchedule.CodecDecodeSelf(d) + } + case "doNotPause": + if r.TryDecodeAsNil() { + x.DoNotPause = false + } else { + yyv13 := &x.DoNotPause + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*bool)(yyv13)) = r.DecodeBool() + } + } + case "monitor": + if r.TryDecodeAsNil() { + if x.Monitor != nil { + x.Monitor = nil + } + } else { + if x.Monitor == nil { + x.Monitor = new(MonitorSpec) + } + x.Monitor.CodecDecodeSelf(d) + } + case "resources": + if r.TryDecodeAsNil() { + x.Resources = pkg4_v1.ResourceRequirements{} + } else { + yyv16 := &x.Resources + yyv16.CodecDecodeSelf(d) + } + case "affinity": + if r.TryDecodeAsNil() { + if x.Affinity != nil { + x.Affinity = nil + } + } else { + if x.Affinity == nil { + x.Affinity = new(pkg4_v1.Affinity) + } + x.Affinity.CodecDecodeSelf(d) + } + case "schedulerName": + if r.TryDecodeAsNil() { + x.SchedulerName = "" + } else { + yyv18 := &x.SchedulerName + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *((*string)(yyv18)) = r.DecodeString() + } + } + case "tolerations": + if r.TryDecodeAsNil() { + x.Tolerations = nil + } else { + yyv20 := &x.Tolerations + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + h.decSlicev1_Toleration((*[]pkg4_v1.Toleration)(yyv20), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd9675) +} + +func (x *ElasticsearchSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj22 int + var yyb22 bool + var yyhl22 bool = l >= 0 + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Version = "" + } else { + yyv23 := &x.Version + yym24 := z.DecBinary() + _ = yym24 + if false { + } else if z.HasExtensions() && z.DecExt(yyv23) { + } else if !yym24 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv23) + } else { + *((*string)(yyv23)) = r.DecodeString() + } + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Replicas = 0 + } else { + yyv25 := &x.Replicas + yym26 := z.DecBinary() + _ = yym26 + if false { + } else { + *((*int32)(yyv25)) = int32(r.DecodeInt(32)) + } + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + if x.Storage != nil { + x.Storage = nil + } + } else { + if x.Storage == nil { + x.Storage = new(pkg4_v1.PersistentVolumeClaimSpec) + } + x.Storage.CodecDecodeSelf(d) + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.NodeSelector = nil + } else { + yyv28 := &x.NodeSelector + yym29 := z.DecBinary() + _ = yym29 + if false { + } else { + z.F.DecMapStringStringX(yyv28, false, d) + } + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + if x.Init != nil { + x.Init = nil + } + } else { + if x.Init == nil { + x.Init = new(InitSpec) + } + x.Init.CodecDecodeSelf(d) + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + if x.BackupSchedule != nil { + x.BackupSchedule = nil + } + } else { + if x.BackupSchedule == nil { + x.BackupSchedule = new(BackupScheduleSpec) + } + x.BackupSchedule.CodecDecodeSelf(d) + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.DoNotPause = false + } else { + yyv32 := &x.DoNotPause + yym33 := z.DecBinary() + _ = yym33 + if false { + } else { + *((*bool)(yyv32)) = r.DecodeBool() + } + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + if x.Monitor != nil { + x.Monitor = nil + } + } else { + if x.Monitor == nil { + x.Monitor = new(MonitorSpec) + } + x.Monitor.CodecDecodeSelf(d) + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Resources = pkg4_v1.ResourceRequirements{} + } else { + yyv35 := &x.Resources + yyv35.CodecDecodeSelf(d) + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + if x.Affinity != nil { + x.Affinity = nil + } + } else { + if x.Affinity == nil { + x.Affinity = new(pkg4_v1.Affinity) + } + x.Affinity.CodecDecodeSelf(d) + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.SchedulerName = "" + } else { + yyv37 := &x.SchedulerName + yym38 := z.DecBinary() + _ = yym38 + if false { + } else { + *((*string)(yyv37)) = r.DecodeString() + } + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Tolerations = nil + } else { + yyv39 := &x.Tolerations + yym40 := z.DecBinary() + _ = yym40 + if false { + } else { + h.decSlicev1_Toleration((*[]pkg4_v1.Toleration)(yyv39), d) + } + } + for { + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + z.DecStructFieldNotFound(yyj22-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) +} + +func (x *ElasticsearchStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.CreationTime != nil + yyq2[1] = x.Phase != "" + yyq2[2] = x.Reason != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[0] { + if x.CreationTime == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else if z.HasExtensions() && z.EncExt(x.CreationTime) { + } else if yym4 { + z.EncBinaryMarshal(x.CreationTime) + } else if !yym4 && z.IsJSONHandle() { + z.EncJSONMarshal(x.CreationTime) + } else { + z.EncFallback(x.CreationTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("creationTime")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + if x.CreationTime == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(x.CreationTime) { + } else if yym5 { + z.EncBinaryMarshal(x.CreationTime) + } else if !yym5 && z.IsJSONHandle() { + z.EncJSONMarshal(x.CreationTime) + } else { + z.EncFallback(x.CreationTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[1] { + yysf7 := &x.Phase + yysf7.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF89675, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("phase")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yysf8 := &x.Phase + yysf8.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF89675, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd9675) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd9675) + } + } + } +} + +func (x *ElasticsearchStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap9675 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd9675) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray9675 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr9675) + } + } +} + +func (x *ElasticsearchStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey9675) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue9675) + switch yys3 { + case "creationTime": + if r.TryDecodeAsNil() { + if x.CreationTime != nil { + x.CreationTime = nil + } + } else { + if x.CreationTime == nil { + x.CreationTime = new(pkg1_v1.Time) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(x.CreationTime) { + } else if yym5 { + z.DecBinaryUnmarshal(x.CreationTime) + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.CreationTime) + } else { + z.DecFallback(x.CreationTime, false) + } + } + case "phase": + if r.TryDecodeAsNil() { + x.Phase = "" + } else { + yyv6 := &x.Phase + yyv6.CodecDecodeSelf(d) + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv7 := &x.Reason + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd9675) +} + +func (x *ElasticsearchStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer9675 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + if x.CreationTime != nil { + x.CreationTime = nil + } + } else { + if x.CreationTime == nil { + x.CreationTime = new(pkg1_v1.Time) + } + yym11 := z.DecBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.DecExt(x.CreationTime) { + } else if yym11 { + z.DecBinaryUnmarshal(x.CreationTime) + } else if !yym11 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.CreationTime) + } else { + z.DecFallback(x.CreationTime, false) + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Phase = "" + } else { + yyv12 := &x.Phase + yyv12.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv13 := &x.Reason + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) +} + +func (x *ElasticsearchList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = len(x.Items) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF89675, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF89675, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF89675, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if yyq2[3] { + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceElasticsearch(([]Elasticsearch)(x.Items), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceElasticsearch(([]Elasticsearch)(x.Items), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd9675) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd9675) + } + } + } +} + +func (x *ElasticsearchList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap9675 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd9675) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray9675 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr9675) + } + } +} + +func (x *ElasticsearchList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey9675) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue9675) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceElasticsearch((*[]Elasticsearch)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd9675) +} + +func (x *ElasticsearchList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer9675 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceElasticsearch((*[]Elasticsearch)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) +} + +func (x *ElasticsearchSummary) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if x.IdCount == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + z.F.EncMapStringInt64V(x.IdCount, false, e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("idCount")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + if x.IdCount == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + z.F.EncMapStringInt64V(x.IdCount, false, e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if x.Mapping == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.EncFallback(x.Mapping) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("mapping")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + if x.Mapping == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + z.EncFallback(x.Mapping) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + if x.Setting == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + z.EncFallback(x.Setting) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey9675) + r.EncodeString(codecSelferC_UTF89675, string("setting")) + z.EncSendContainerState(codecSelfer_containerMapValue9675) + if x.Setting == nil { + r.EncodeNil() + } else { + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + z.EncFallback(x.Setting) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd9675) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd9675) + } + } + } +} + +func (x *ElasticsearchSummary) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap9675 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd9675) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray9675 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr9675) + } + } +} + +func (x *ElasticsearchSummary) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey9675) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue9675) + switch yys3 { + case "idCount": + if r.TryDecodeAsNil() { + x.IdCount = nil + } else { + yyv4 := &x.IdCount + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + z.F.DecMapStringInt64X(yyv4, false, d) + } + } + case "mapping": + if r.TryDecodeAsNil() { + x.Mapping = nil + } else { + yyv6 := &x.Mapping + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + z.DecFallback(yyv6, true) + } + } + case "setting": + if r.TryDecodeAsNil() { + x.Setting = nil + } else { + yyv8 := &x.Setting + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + z.DecFallback(yyv8, true) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd9675) +} + +func (x *ElasticsearchSummary) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer9675 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.IdCount = nil + } else { + yyv11 := &x.IdCount + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + z.F.DecMapStringInt64X(yyv11, false, d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Mapping = nil + } else { + yyv13 := &x.Mapping + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + z.DecFallback(yyv13, true) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + if r.TryDecodeAsNil() { + x.Setting = nil + } else { + yyv15 := &x.Setting + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + z.DecFallback(yyv15, true) + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem9675) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd9675) +} + +func (x codecSelfer9675) encSlicev1_Toleration(v []pkg4_v1.Toleration, e *codec1978.Encoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd9675) +} + +func (x codecSelfer9675) decSlicev1_Toleration(v *[]pkg4_v1.Toleration, d *codec1978.Decoder) { + var h codecSelfer9675 + 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 = []pkg4_v1.Toleration{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 72) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]pkg4_v1.Toleration, yyrl1) + } + } else { + yyv1 = make([]pkg4_v1.Toleration, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = pkg4_v1.Toleration{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, pkg4_v1.Toleration{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = pkg4_v1.Toleration{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, pkg4_v1.Toleration{}) // var yyz1 pkg4_v1.Toleration + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = pkg4_v1.Toleration{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []pkg4_v1.Toleration{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer9675) encSliceElasticsearch(v []Elasticsearch, e *codec1978.Encoder) { + var h codecSelfer9675 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem9675) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd9675) +} + +func (x codecSelfer9675) decSliceElasticsearch(v *[]Elasticsearch, d *codec1978.Decoder) { + var h codecSelfer9675 + 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 = []Elasticsearch{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 440) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Elasticsearch, yyrl1) + } + } else { + yyv1 = make([]Elasticsearch, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Elasticsearch{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Elasticsearch{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Elasticsearch{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Elasticsearch{}) // var yyz1 Elasticsearch + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Elasticsearch{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Elasticsearch{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/postgres_types.generated.go b/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/postgres_types.generated.go new file mode 100644 index 000000000..9661dee4e --- /dev/null +++ b/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/postgres_types.generated.go @@ -0,0 +1,3103 @@ +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1alpha1 + +import ( + "errors" + "fmt" + "reflect" + "runtime" + time "time" + + pkg3_types "github.com/appscode/go/encoding/json/types" + codec1978 "github.com/ugorji/go/codec" + pkg5_resource "k8s.io/apimachinery/pkg/api/resource" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + pkg4_v1 "k8s.io/client-go/pkg/api/v1" +) + +const ( + // ----- content types ---- + codecSelferC_UTF88321 = 1 + codecSelferC_RAW8321 = 0 + // ----- value types used ---- + codecSelferValueTypeArray8321 = 10 + codecSelferValueTypeMap8321 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey8321 = 2 + codecSelfer_containerMapValue8321 = 3 + codecSelfer_containerMapEnd8321 = 4 + codecSelfer_containerArrayElem8321 = 6 + codecSelfer_containerArrayEnd8321 = 7 +) + +var ( + codecSelferBitsize8321 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr8321 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer8321 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg3_types.StrYo + var v1 pkg5_resource.Quantity + var v2 pkg1_v1.TypeMeta + var v3 pkg2_types.UID + var v4 pkg4_v1.PersistentVolumeClaimSpec + var v5 time.Time + _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 + } +} + +func (x *Postgres) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF88321, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF88321, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8321) + } + } + } +} + +func (x *Postgres) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8321 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8321) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8321 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8321) + } + } +} + +func (x *Postgres) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8321) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8321) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = PostgresSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = PostgresStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8321) +} + +func (x *Postgres) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.Spec = PostgresSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.Status = PostgresStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) +} + +func (x *PostgresSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [12]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Version != "" + yyq2[1] = x.Storage != nil + yyq2[2] = x.DatabaseSecret != nil + yyq2[3] = len(x.NodeSelector) != 0 + yyq2[4] = x.Init != nil + yyq2[5] = x.BackupSchedule != nil + yyq2[6] = x.DoNotPause != false + yyq2[7] = x.Monitor != nil + yyq2[8] = true + yyq2[9] = x.Affinity != nil + yyq2[10] = x.SchedulerName != "" + yyq2[11] = len(x.Tolerations) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(12) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else if z.HasExtensions() && z.EncExt(x.Version) { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.Version)) + } + } else { + r.EncodeString(codecSelferC_UTF88321, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("version")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(x.Version) { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.Version)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[1] { + if x.Storage == nil { + r.EncodeNil() + } else { + x.Storage.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("storage")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if x.Storage == nil { + r.EncodeNil() + } else { + x.Storage.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[2] { + if x.DatabaseSecret == nil { + r.EncodeNil() + } else { + x.DatabaseSecret.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("databaseSecret")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if x.DatabaseSecret == nil { + r.EncodeNil() + } else { + x.DatabaseSecret.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[3] { + if x.NodeSelector == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + z.F.EncMapStringStringV(x.NodeSelector, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("nodeSelector")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if x.NodeSelector == nil { + r.EncodeNil() + } else { + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + z.F.EncMapStringStringV(x.NodeSelector, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[4] { + if x.Init == nil { + r.EncodeNil() + } else { + x.Init.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("init")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if x.Init == nil { + r.EncodeNil() + } else { + x.Init.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[5] { + if x.BackupSchedule == nil { + r.EncodeNil() + } else { + x.BackupSchedule.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("backupSchedule")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if x.BackupSchedule == nil { + r.EncodeNil() + } else { + x.BackupSchedule.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[6] { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeBool(bool(x.DoNotPause)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("doNotPause")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeBool(bool(x.DoNotPause)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[7] { + if x.Monitor == nil { + r.EncodeNil() + } else { + x.Monitor.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[7] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("monitor")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if x.Monitor == nil { + r.EncodeNil() + } else { + x.Monitor.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[8] { + yy28 := &x.Resources + yy28.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[8] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("resources")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yy30 := &x.Resources + yy30.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[9] { + if x.Affinity == nil { + r.EncodeNil() + } else { + x.Affinity.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[9] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("affinity")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if x.Affinity == nil { + r.EncodeNil() + } else { + x.Affinity.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[10] { + yym36 := z.EncBinary() + _ = yym36 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.SchedulerName)) + } + } else { + r.EncodeString(codecSelferC_UTF88321, "") + } + } else { + if yyq2[10] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("schedulerName")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yym37 := z.EncBinary() + _ = yym37 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.SchedulerName)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[11] { + if x.Tolerations == nil { + r.EncodeNil() + } else { + yym39 := z.EncBinary() + _ = yym39 + if false { + } else { + h.encSlicev1_Toleration(([]pkg4_v1.Toleration)(x.Tolerations), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[11] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("tolerations")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if x.Tolerations == nil { + r.EncodeNil() + } else { + yym40 := z.EncBinary() + _ = yym40 + if false { + } else { + h.encSlicev1_Toleration(([]pkg4_v1.Toleration)(x.Tolerations), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8321) + } + } + } +} + +func (x *PostgresSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8321 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8321) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8321 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8321) + } + } +} + +func (x *PostgresSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8321) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8321) + switch yys3 { + case "version": + if r.TryDecodeAsNil() { + x.Version = "" + } else { + yyv4 := &x.Version + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv4) + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "storage": + if r.TryDecodeAsNil() { + if x.Storage != nil { + x.Storage = nil + } + } else { + if x.Storage == nil { + x.Storage = new(pkg4_v1.PersistentVolumeClaimSpec) + } + x.Storage.CodecDecodeSelf(d) + } + case "databaseSecret": + if r.TryDecodeAsNil() { + if x.DatabaseSecret != nil { + x.DatabaseSecret = nil + } + } else { + if x.DatabaseSecret == nil { + x.DatabaseSecret = new(pkg4_v1.SecretVolumeSource) + } + x.DatabaseSecret.CodecDecodeSelf(d) + } + case "nodeSelector": + if r.TryDecodeAsNil() { + x.NodeSelector = nil + } else { + yyv8 := &x.NodeSelector + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + z.F.DecMapStringStringX(yyv8, false, d) + } + } + case "init": + if r.TryDecodeAsNil() { + if x.Init != nil { + x.Init = nil + } + } else { + if x.Init == nil { + x.Init = new(InitSpec) + } + x.Init.CodecDecodeSelf(d) + } + case "backupSchedule": + if r.TryDecodeAsNil() { + if x.BackupSchedule != nil { + x.BackupSchedule = nil + } + } else { + if x.BackupSchedule == nil { + x.BackupSchedule = new(BackupScheduleSpec) + } + x.BackupSchedule.CodecDecodeSelf(d) + } + case "doNotPause": + if r.TryDecodeAsNil() { + x.DoNotPause = false + } else { + yyv12 := &x.DoNotPause + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*bool)(yyv12)) = r.DecodeBool() + } + } + case "monitor": + if r.TryDecodeAsNil() { + if x.Monitor != nil { + x.Monitor = nil + } + } else { + if x.Monitor == nil { + x.Monitor = new(MonitorSpec) + } + x.Monitor.CodecDecodeSelf(d) + } + case "resources": + if r.TryDecodeAsNil() { + x.Resources = pkg4_v1.ResourceRequirements{} + } else { + yyv15 := &x.Resources + yyv15.CodecDecodeSelf(d) + } + case "affinity": + if r.TryDecodeAsNil() { + if x.Affinity != nil { + x.Affinity = nil + } + } else { + if x.Affinity == nil { + x.Affinity = new(pkg4_v1.Affinity) + } + x.Affinity.CodecDecodeSelf(d) + } + case "schedulerName": + if r.TryDecodeAsNil() { + x.SchedulerName = "" + } else { + yyv17 := &x.SchedulerName + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + case "tolerations": + if r.TryDecodeAsNil() { + x.Tolerations = nil + } else { + yyv19 := &x.Tolerations + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSlicev1_Toleration((*[]pkg4_v1.Toleration)(yyv19), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8321) +} + +func (x *PostgresSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj21 int + var yyb21 bool + var yyhl21 bool = l >= 0 + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.Version = "" + } else { + yyv22 := &x.Version + yym23 := z.DecBinary() + _ = yym23 + if false { + } else if z.HasExtensions() && z.DecExt(yyv22) { + } else if !yym23 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv22) + } else { + *((*string)(yyv22)) = r.DecodeString() + } + } + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + if x.Storage != nil { + x.Storage = nil + } + } else { + if x.Storage == nil { + x.Storage = new(pkg4_v1.PersistentVolumeClaimSpec) + } + x.Storage.CodecDecodeSelf(d) + } + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + if x.DatabaseSecret != nil { + x.DatabaseSecret = nil + } + } else { + if x.DatabaseSecret == nil { + x.DatabaseSecret = new(pkg4_v1.SecretVolumeSource) + } + x.DatabaseSecret.CodecDecodeSelf(d) + } + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.NodeSelector = nil + } else { + yyv26 := &x.NodeSelector + yym27 := z.DecBinary() + _ = yym27 + if false { + } else { + z.F.DecMapStringStringX(yyv26, false, d) + } + } + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + if x.Init != nil { + x.Init = nil + } + } else { + if x.Init == nil { + x.Init = new(InitSpec) + } + x.Init.CodecDecodeSelf(d) + } + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + if x.BackupSchedule != nil { + x.BackupSchedule = nil + } + } else { + if x.BackupSchedule == nil { + x.BackupSchedule = new(BackupScheduleSpec) + } + x.BackupSchedule.CodecDecodeSelf(d) + } + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.DoNotPause = false + } else { + yyv30 := &x.DoNotPause + yym31 := z.DecBinary() + _ = yym31 + if false { + } else { + *((*bool)(yyv30)) = r.DecodeBool() + } + } + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + if x.Monitor != nil { + x.Monitor = nil + } + } else { + if x.Monitor == nil { + x.Monitor = new(MonitorSpec) + } + x.Monitor.CodecDecodeSelf(d) + } + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.Resources = pkg4_v1.ResourceRequirements{} + } else { + yyv33 := &x.Resources + yyv33.CodecDecodeSelf(d) + } + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + if x.Affinity != nil { + x.Affinity = nil + } + } else { + if x.Affinity == nil { + x.Affinity = new(pkg4_v1.Affinity) + } + x.Affinity.CodecDecodeSelf(d) + } + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.SchedulerName = "" + } else { + yyv35 := &x.SchedulerName + yym36 := z.DecBinary() + _ = yym36 + if false { + } else { + *((*string)(yyv35)) = r.DecodeString() + } + } + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.Tolerations = nil + } else { + yyv37 := &x.Tolerations + yym38 := z.DecBinary() + _ = yym38 + if false { + } else { + h.decSlicev1_Toleration((*[]pkg4_v1.Toleration)(yyv37), d) + } + } + for { + yyj21++ + if yyhl21 { + yyb21 = yyj21 > l + } else { + yyb21 = r.CheckBreak() + } + if yyb21 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + z.DecStructFieldNotFound(yyj21-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) +} + +func (x *PostgresStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.CreationTime != nil + yyq2[1] = x.Phase != "" + yyq2[2] = x.Reason != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[0] { + if x.CreationTime == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else if z.HasExtensions() && z.EncExt(x.CreationTime) { + } else if yym4 { + z.EncBinaryMarshal(x.CreationTime) + } else if !yym4 && z.IsJSONHandle() { + z.EncJSONMarshal(x.CreationTime) + } else { + z.EncFallback(x.CreationTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("creationTime")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if x.CreationTime == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(x.CreationTime) { + } else if yym5 { + z.EncBinaryMarshal(x.CreationTime) + } else if !yym5 && z.IsJSONHandle() { + z.EncJSONMarshal(x.CreationTime) + } else { + z.EncFallback(x.CreationTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[1] { + yysf7 := &x.Phase + yysf7.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF88321, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("phase")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yysf8 := &x.Phase + yysf8.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF88321, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8321) + } + } + } +} + +func (x *PostgresStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8321 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8321) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8321 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8321) + } + } +} + +func (x *PostgresStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8321) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8321) + switch yys3 { + case "creationTime": + if r.TryDecodeAsNil() { + if x.CreationTime != nil { + x.CreationTime = nil + } + } else { + if x.CreationTime == nil { + x.CreationTime = new(pkg1_v1.Time) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(x.CreationTime) { + } else if yym5 { + z.DecBinaryUnmarshal(x.CreationTime) + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.CreationTime) + } else { + z.DecFallback(x.CreationTime, false) + } + } + case "phase": + if r.TryDecodeAsNil() { + x.Phase = "" + } else { + yyv6 := &x.Phase + yyv6.CodecDecodeSelf(d) + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv7 := &x.Reason + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8321) +} + +func (x *PostgresStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + if x.CreationTime != nil { + x.CreationTime = nil + } + } else { + if x.CreationTime == nil { + x.CreationTime = new(pkg1_v1.Time) + } + yym11 := z.DecBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.DecExt(x.CreationTime) { + } else if yym11 { + z.DecBinaryUnmarshal(x.CreationTime) + } else if !yym11 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.CreationTime) + } else { + z.DecFallback(x.CreationTime, false) + } + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.Phase = "" + } else { + yyv12 := &x.Phase + yyv12.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv13 := &x.Reason + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) +} + +func (x *PostgresList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = len(x.Items) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF88321, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF88321, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if yyq2[3] { + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSlicePostgres(([]Postgres)(x.Items), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSlicePostgres(([]Postgres)(x.Items), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8321) + } + } + } +} + +func (x *PostgresList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8321 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8321) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8321 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8321) + } + } +} + +func (x *PostgresList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8321) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8321) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSlicePostgres((*[]Postgres)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8321) +} + +func (x *PostgresList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSlicePostgres((*[]Postgres)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) +} + +func (x *PostgresTableInfo) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeInt(int64(x.TotalRow)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("totalRow")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeInt(int64(x.TotalRow)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeInt(int64(x.MaxID)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("maxId")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeInt(int64(x.MaxID)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeInt(int64(x.NextID)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("nextId")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeInt(int64(x.NextID)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8321) + } + } + } +} + +func (x *PostgresTableInfo) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8321 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8321) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8321 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8321) + } + } +} + +func (x *PostgresTableInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8321) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8321) + switch yys3 { + case "totalRow": + if r.TryDecodeAsNil() { + x.TotalRow = 0 + } else { + yyv4 := &x.TotalRow + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*int64)(yyv4)) = int64(r.DecodeInt(64)) + } + } + case "maxId": + if r.TryDecodeAsNil() { + x.MaxID = 0 + } else { + yyv6 := &x.MaxID + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*int64)(yyv6)) = int64(r.DecodeInt(64)) + } + } + case "nextId": + if r.TryDecodeAsNil() { + x.NextID = 0 + } else { + yyv8 := &x.NextID + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*int64)(yyv8)) = int64(r.DecodeInt(64)) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8321) +} + +func (x *PostgresTableInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.TotalRow = 0 + } else { + yyv11 := &x.TotalRow + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*int64)(yyv11)) = int64(r.DecodeInt(64)) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.MaxID = 0 + } else { + yyv13 := &x.MaxID + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*int64)(yyv13)) = int64(r.DecodeInt(64)) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.NextID = 0 + } else { + yyv15 := &x.NextID + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*int64)(yyv15)) = int64(r.DecodeInt(64)) + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) +} + +func (x *PostgresSchemaInfo) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(1) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if x.Table == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encMapstringPtrtoPostgresTableInfo((map[string]*PostgresTableInfo)(x.Table), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("table")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if x.Table == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encMapstringPtrtoPostgresTableInfo((map[string]*PostgresTableInfo)(x.Table), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8321) + } + } + } +} + +func (x *PostgresSchemaInfo) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8321 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8321) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8321 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8321) + } + } +} + +func (x *PostgresSchemaInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8321) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8321) + switch yys3 { + case "table": + if r.TryDecodeAsNil() { + x.Table = nil + } else { + yyv4 := &x.Table + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + h.decMapstringPtrtoPostgresTableInfo((*map[string]*PostgresTableInfo)(yyv4), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8321) +} + +func (x *PostgresSchemaInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.Table = nil + } else { + yyv7 := &x.Table + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + h.decMapstringPtrtoPostgresTableInfo((*map[string]*PostgresTableInfo)(yyv7), d) + } + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) +} + +func (x *PostgresSummary) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(1) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + if x.Schema == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encMapstringPtrtoPostgresSchemaInfo((map[string]*PostgresSchemaInfo)(x.Schema), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + r.EncodeString(codecSelferC_UTF88321, string("schema")) + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if x.Schema == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encMapstringPtrtoPostgresSchemaInfo((map[string]*PostgresSchemaInfo)(x.Schema), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8321) + } + } + } +} + +func (x *PostgresSummary) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8321 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8321) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8321 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8321) + } + } +} + +func (x *PostgresSummary) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8321) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8321) + switch yys3 { + case "schema": + if r.TryDecodeAsNil() { + x.Schema = nil + } else { + yyv4 := &x.Schema + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + h.decMapstringPtrtoPostgresSchemaInfo((*map[string]*PostgresSchemaInfo)(yyv4), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8321) +} + +func (x *PostgresSummary) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + if r.TryDecodeAsNil() { + x.Schema = nil + } else { + yyv7 := &x.Schema + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + h.decMapstringPtrtoPostgresSchemaInfo((*map[string]*PostgresSchemaInfo)(yyv7), d) + } + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8321) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8321) +} + +func (x codecSelfer8321) encSlicev1_Toleration(v []pkg4_v1.Toleration, e *codec1978.Encoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd8321) +} + +func (x codecSelfer8321) decSlicev1_Toleration(v *[]pkg4_v1.Toleration, d *codec1978.Decoder) { + var h codecSelfer8321 + 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 = []pkg4_v1.Toleration{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 72) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]pkg4_v1.Toleration, yyrl1) + } + } else { + yyv1 = make([]pkg4_v1.Toleration, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = pkg4_v1.Toleration{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, pkg4_v1.Toleration{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = pkg4_v1.Toleration{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, pkg4_v1.Toleration{}) // var yyz1 pkg4_v1.Toleration + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = pkg4_v1.Toleration{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []pkg4_v1.Toleration{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer8321) encSlicePostgres(v []Postgres, e *codec1978.Encoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem8321) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd8321) +} + +func (x codecSelfer8321) decSlicePostgres(v *[]Postgres, d *codec1978.Decoder) { + var h codecSelfer8321 + 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 = []Postgres{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 440) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Postgres, yyrl1) + } + } else { + yyv1 = make([]Postgres, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Postgres{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Postgres{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Postgres{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Postgres{}) // var yyz1 Postgres + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Postgres{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Postgres{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer8321) encMapstringPtrtoPostgresTableInfo(v map[string]*PostgresTableInfo, e *codec1978.Encoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeMapStart(len(v)) + for yyk1, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + yym2 := z.EncBinary() + _ = yym2 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(yyk1)) + } + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if yyv1 == nil { + r.EncodeNil() + } else { + yyv1.CodecEncodeSelf(e) + } + } + z.EncSendContainerState(codecSelfer_containerMapEnd8321) +} + +func (x codecSelfer8321) decMapstringPtrtoPostgresTableInfo(v *map[string]*PostgresTableInfo, d *codec1978.Decoder) { + var h codecSelfer8321 + 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]*PostgresTableInfo, yyrl1) + *v = yyv1 + } + var yymk1 string + var yymv1 *PostgresTableInfo + var yymg1, yyms1, yymok1 bool + if yybh1.MapValueReset { + yymg1 = true + } + if yyl1 > 0 { + for yyj1 := 0; yyj1 < yyl1; yyj1++ { + z.DecSendContainerState(codecSelfer_containerMapKey8321) + if r.TryDecodeAsNil() { + yymk1 = "" + } else { + yyv2 := &yymk1 + yym3 := z.DecBinary() + _ = yym3 + if false { + } else { + *((*string)(yyv2)) = r.DecodeString() + } + } + + yyms1 = true + if yymg1 { + yymv1, yymok1 = yyv1[yymk1] + if yymok1 { + yyms1 = false + } + } else { + yymv1 = nil + } + z.DecSendContainerState(codecSelfer_containerMapValue8321) + if r.TryDecodeAsNil() { + if yymv1 != nil { + *yymv1 = PostgresTableInfo{} + } + } else { + if yymv1 == nil { + yymv1 = new(PostgresTableInfo) + } + yymv1.CodecDecodeSelf(d) + } + + if yyms1 && yyv1 != nil { + yyv1[yymk1] = yymv1 + } + } + } else if yyl1 < 0 { + for yyj1 := 0; !r.CheckBreak(); yyj1++ { + z.DecSendContainerState(codecSelfer_containerMapKey8321) + if r.TryDecodeAsNil() { + yymk1 = "" + } else { + yyv5 := &yymk1 + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } + } + + yyms1 = true + if yymg1 { + yymv1, yymok1 = yyv1[yymk1] + if yymok1 { + yyms1 = false + } + } else { + yymv1 = nil + } + z.DecSendContainerState(codecSelfer_containerMapValue8321) + if r.TryDecodeAsNil() { + if yymv1 != nil { + *yymv1 = PostgresTableInfo{} + } + } else { + if yymv1 == nil { + yymv1 = new(PostgresTableInfo) + } + yymv1.CodecDecodeSelf(d) + } + + if yyms1 && yyv1 != nil { + yyv1[yymk1] = yymv1 + } + } + } // else len==0: TODO: Should we clear map entries? + z.DecSendContainerState(codecSelfer_containerMapEnd8321) +} + +func (x codecSelfer8321) encMapstringPtrtoPostgresSchemaInfo(v map[string]*PostgresSchemaInfo, e *codec1978.Encoder) { + var h codecSelfer8321 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeMapStart(len(v)) + for yyk1, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerMapKey8321) + yym2 := z.EncBinary() + _ = yym2 + if false { + } else { + r.EncodeString(codecSelferC_UTF88321, string(yyk1)) + } + z.EncSendContainerState(codecSelfer_containerMapValue8321) + if yyv1 == nil { + r.EncodeNil() + } else { + yyv1.CodecEncodeSelf(e) + } + } + z.EncSendContainerState(codecSelfer_containerMapEnd8321) +} + +func (x codecSelfer8321) decMapstringPtrtoPostgresSchemaInfo(v *map[string]*PostgresSchemaInfo, d *codec1978.Decoder) { + var h codecSelfer8321 + 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]*PostgresSchemaInfo, yyrl1) + *v = yyv1 + } + var yymk1 string + var yymv1 *PostgresSchemaInfo + var yymg1, yyms1, yymok1 bool + if yybh1.MapValueReset { + yymg1 = true + } + if yyl1 > 0 { + for yyj1 := 0; yyj1 < yyl1; yyj1++ { + z.DecSendContainerState(codecSelfer_containerMapKey8321) + if r.TryDecodeAsNil() { + yymk1 = "" + } else { + yyv2 := &yymk1 + yym3 := z.DecBinary() + _ = yym3 + if false { + } else { + *((*string)(yyv2)) = r.DecodeString() + } + } + + yyms1 = true + if yymg1 { + yymv1, yymok1 = yyv1[yymk1] + if yymok1 { + yyms1 = false + } + } else { + yymv1 = nil + } + z.DecSendContainerState(codecSelfer_containerMapValue8321) + if r.TryDecodeAsNil() { + if yymv1 != nil { + *yymv1 = PostgresSchemaInfo{} + } + } else { + if yymv1 == nil { + yymv1 = new(PostgresSchemaInfo) + } + yymv1.CodecDecodeSelf(d) + } + + if yyms1 && yyv1 != nil { + yyv1[yymk1] = yymv1 + } + } + } else if yyl1 < 0 { + for yyj1 := 0; !r.CheckBreak(); yyj1++ { + z.DecSendContainerState(codecSelfer_containerMapKey8321) + if r.TryDecodeAsNil() { + yymk1 = "" + } else { + yyv5 := &yymk1 + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } + } + + yyms1 = true + if yymg1 { + yymv1, yymok1 = yyv1[yymk1] + if yymok1 { + yyms1 = false + } + } else { + yymv1 = nil + } + z.DecSendContainerState(codecSelfer_containerMapValue8321) + if r.TryDecodeAsNil() { + if yymv1 != nil { + *yymv1 = PostgresSchemaInfo{} + } + } else { + if yymv1 == nil { + yymv1 = new(PostgresSchemaInfo) + } + yymv1.CodecDecodeSelf(d) + } + + if yyms1 && yyv1 != nil { + yyv1[yymk1] = yymv1 + } + } + } // else len==0: TODO: Should we clear map entries? + z.DecSendContainerState(codecSelfer_containerMapEnd8321) +} diff --git a/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/snapshot_types.generated.go b/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/snapshot_types.generated.go new file mode 100644 index 000000000..715e001e1 --- /dev/null +++ b/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/snapshot_types.generated.go @@ -0,0 +1,2046 @@ +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1alpha1 + +import ( + "errors" + "fmt" + "reflect" + "runtime" + time "time" + + codec1978 "github.com/ugorji/go/codec" + pkg4_resource "k8s.io/apimachinery/pkg/api/resource" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + pkg3_v1 "k8s.io/client-go/pkg/api/v1" +) + +const ( + // ----- content types ---- + codecSelferC_UTF86553 = 1 + codecSelferC_RAW6553 = 0 + // ----- value types used ---- + codecSelferValueTypeArray6553 = 10 + codecSelferValueTypeMap6553 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey6553 = 2 + codecSelfer_containerMapValue6553 = 3 + codecSelfer_containerMapEnd6553 = 4 + codecSelfer_containerArrayElem6553 = 6 + codecSelfer_containerArrayEnd6553 = 7 +) + +var ( + codecSelferBitsize6553 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr6553 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer6553 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg4_resource.Quantity + var v1 pkg1_v1.TypeMeta + var v2 pkg2_types.UID + var v3 pkg3_v1.VolumeSource + var v4 time.Time + _, _, _, _, _ = v0, v1, v2, v3, v4 + } +} + +func (x *Snapshot) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = true + yyq2[4] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF86553, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF86553, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[3] { + yy15 := &x.Spec + yy15.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + yy17 := &x.Spec + yy17.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[4] { + yy20 := &x.Status + yy20.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + yy22 := &x.Status + yy22.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd6553) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd6553) + } + } + } +} + +func (x *Snapshot) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap6553 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd6553) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray6553 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr6553) + } + } +} + +func (x *Snapshot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey6553) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue6553) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = SnapshotSpec{} + } else { + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = SnapshotStatus{} + } else { + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd6553) +} + +func (x *Snapshot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer6553 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.Spec = SnapshotSpec{} + } else { + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.Status = SnapshotStatus{} + } else { + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) +} + +func (x *SnapshotSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [8]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.DatabaseName != "" + yyq2[1] = x.StorageSecretName != "" + yyq2[2] = x.SnapshotStorageSpec.Local != nil && x.Local != nil + yyq2[3] = x.SnapshotStorageSpec.S3 != nil && x.S3 != nil + yyq2[4] = x.SnapshotStorageSpec.GCS != nil && x.GCS != nil + yyq2[5] = x.SnapshotStorageSpec.Azure != nil && x.Azure != nil + yyq2[6] = x.SnapshotStorageSpec.Swift != nil && x.Swift != nil + yyq2[7] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(8) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.DatabaseName)) + } + } else { + r.EncodeString(codecSelferC_UTF86553, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("databaseName")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.DatabaseName)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.StorageSecretName)) + } + } else { + r.EncodeString(codecSelferC_UTF86553, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("storageSecretName")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.StorageSecretName)) + } + } + } + var yyn9 bool + if x.SnapshotStorageSpec.Local == nil { + yyn9 = true + goto LABEL9 + } + LABEL9: + if yyr2 || yy2arr2 { + if yyn9 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[2] { + if x.Local == nil { + r.EncodeNil() + } else { + x.Local.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("local")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + if yyn9 { + r.EncodeNil() + } else { + if x.Local == nil { + r.EncodeNil() + } else { + x.Local.CodecEncodeSelf(e) + } + } + } + } + var yyn12 bool + if x.SnapshotStorageSpec.S3 == nil { + yyn12 = true + goto LABEL12 + } + LABEL12: + if yyr2 || yy2arr2 { + if yyn12 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[3] { + if x.S3 == nil { + r.EncodeNil() + } else { + x.S3.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("s3")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + if yyn12 { + r.EncodeNil() + } else { + if x.S3 == nil { + r.EncodeNil() + } else { + x.S3.CodecEncodeSelf(e) + } + } + } + } + var yyn15 bool + if x.SnapshotStorageSpec.GCS == nil { + yyn15 = true + goto LABEL15 + } + LABEL15: + if yyr2 || yy2arr2 { + if yyn15 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[4] { + if x.GCS == nil { + r.EncodeNil() + } else { + x.GCS.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("gcs")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + if yyn15 { + r.EncodeNil() + } else { + if x.GCS == nil { + r.EncodeNil() + } else { + x.GCS.CodecEncodeSelf(e) + } + } + } + } + var yyn18 bool + if x.SnapshotStorageSpec.Azure == nil { + yyn18 = true + goto LABEL18 + } + LABEL18: + if yyr2 || yy2arr2 { + if yyn18 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[5] { + if x.Azure == nil { + r.EncodeNil() + } else { + x.Azure.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("azure")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + if yyn18 { + r.EncodeNil() + } else { + if x.Azure == nil { + r.EncodeNil() + } else { + x.Azure.CodecEncodeSelf(e) + } + } + } + } + var yyn21 bool + if x.SnapshotStorageSpec.Swift == nil { + yyn21 = true + goto LABEL21 + } + LABEL21: + if yyr2 || yy2arr2 { + if yyn21 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[6] { + if x.Swift == nil { + r.EncodeNil() + } else { + x.Swift.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("swift")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + if yyn21 { + r.EncodeNil() + } else { + if x.Swift == nil { + r.EncodeNil() + } else { + x.Swift.CodecEncodeSelf(e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[7] { + yy25 := &x.Resources + yy25.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[7] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("resources")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + yy27 := &x.Resources + yy27.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd6553) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd6553) + } + } + } +} + +func (x *SnapshotSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap6553 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd6553) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray6553 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr6553) + } + } +} + +func (x *SnapshotSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey6553) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue6553) + switch yys3 { + case "databaseName": + if r.TryDecodeAsNil() { + x.DatabaseName = "" + } else { + yyv4 := &x.DatabaseName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "storageSecretName": + if r.TryDecodeAsNil() { + x.StorageSecretName = "" + } else { + yyv6 := &x.StorageSecretName + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "local": + if x.SnapshotStorageSpec.Local == nil { + x.SnapshotStorageSpec.Local = new(LocalSpec) + } + if r.TryDecodeAsNil() { + if x.Local != nil { + x.Local = nil + } + } else { + if x.Local == nil { + x.Local = new(LocalSpec) + } + x.Local.CodecDecodeSelf(d) + } + case "s3": + if x.SnapshotStorageSpec.S3 == nil { + x.SnapshotStorageSpec.S3 = new(S3Spec) + } + if r.TryDecodeAsNil() { + if x.S3 != nil { + x.S3 = nil + } + } else { + if x.S3 == nil { + x.S3 = new(S3Spec) + } + x.S3.CodecDecodeSelf(d) + } + case "gcs": + if x.SnapshotStorageSpec.GCS == nil { + x.SnapshotStorageSpec.GCS = new(GCSSpec) + } + if r.TryDecodeAsNil() { + if x.GCS != nil { + x.GCS = nil + } + } else { + if x.GCS == nil { + x.GCS = new(GCSSpec) + } + x.GCS.CodecDecodeSelf(d) + } + case "azure": + if x.SnapshotStorageSpec.Azure == nil { + x.SnapshotStorageSpec.Azure = new(AzureSpec) + } + if r.TryDecodeAsNil() { + if x.Azure != nil { + x.Azure = nil + } + } else { + if x.Azure == nil { + x.Azure = new(AzureSpec) + } + x.Azure.CodecDecodeSelf(d) + } + case "swift": + if x.SnapshotStorageSpec.Swift == nil { + x.SnapshotStorageSpec.Swift = new(SwiftSpec) + } + if r.TryDecodeAsNil() { + if x.Swift != nil { + x.Swift = nil + } + } else { + if x.Swift == nil { + x.Swift = new(SwiftSpec) + } + x.Swift.CodecDecodeSelf(d) + } + case "resources": + if r.TryDecodeAsNil() { + x.Resources = pkg3_v1.ResourceRequirements{} + } else { + yyv13 := &x.Resources + yyv13.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd6553) +} + +func (x *SnapshotSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer6553 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.DatabaseName = "" + } else { + yyv15 := &x.DatabaseName + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.StorageSecretName = "" + } else { + yyv17 := &x.StorageSecretName + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + if x.SnapshotStorageSpec.Local == nil { + x.SnapshotStorageSpec.Local = new(LocalSpec) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + if x.Local != nil { + x.Local = nil + } + } else { + if x.Local == nil { + x.Local = new(LocalSpec) + } + x.Local.CodecDecodeSelf(d) + } + if x.SnapshotStorageSpec.S3 == nil { + x.SnapshotStorageSpec.S3 = new(S3Spec) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + if x.S3 != nil { + x.S3 = nil + } + } else { + if x.S3 == nil { + x.S3 = new(S3Spec) + } + x.S3.CodecDecodeSelf(d) + } + if x.SnapshotStorageSpec.GCS == nil { + x.SnapshotStorageSpec.GCS = new(GCSSpec) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + if x.GCS != nil { + x.GCS = nil + } + } else { + if x.GCS == nil { + x.GCS = new(GCSSpec) + } + x.GCS.CodecDecodeSelf(d) + } + if x.SnapshotStorageSpec.Azure == nil { + x.SnapshotStorageSpec.Azure = new(AzureSpec) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + if x.Azure != nil { + x.Azure = nil + } + } else { + if x.Azure == nil { + x.Azure = new(AzureSpec) + } + x.Azure.CodecDecodeSelf(d) + } + if x.SnapshotStorageSpec.Swift == nil { + x.SnapshotStorageSpec.Swift = new(SwiftSpec) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + if x.Swift != nil { + x.Swift = nil + } + } else { + if x.Swift == nil { + x.Swift = new(SwiftSpec) + } + x.Swift.CodecDecodeSelf(d) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.Resources = pkg3_v1.ResourceRequirements{} + } else { + yyv24 := &x.Resources + yyv24.CodecDecodeSelf(d) + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + z.DecStructFieldNotFound(yyj14-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) +} + +func (x SnapshotPhase) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x)) + } +} + +func (x *SnapshotPhase) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *SnapshotStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.StartTime != nil + yyq2[1] = x.CompletionTime != nil + yyq2[2] = x.Phase != "" + yyq2[3] = x.Reason != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[0] { + if x.StartTime == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else if z.HasExtensions() && z.EncExt(x.StartTime) { + } else if yym4 { + z.EncBinaryMarshal(x.StartTime) + } else if !yym4 && z.IsJSONHandle() { + z.EncJSONMarshal(x.StartTime) + } else { + z.EncFallback(x.StartTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("startTime")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + if x.StartTime == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(x.StartTime) { + } else if yym5 { + z.EncBinaryMarshal(x.StartTime) + } else if !yym5 && z.IsJSONHandle() { + z.EncJSONMarshal(x.StartTime) + } else { + z.EncFallback(x.StartTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[1] { + if x.CompletionTime == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(x.CompletionTime) { + } else if yym7 { + z.EncBinaryMarshal(x.CompletionTime) + } else if !yym7 && z.IsJSONHandle() { + z.EncJSONMarshal(x.CompletionTime) + } else { + z.EncFallback(x.CompletionTime) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("completionTime")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + if x.CompletionTime == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.EncExt(x.CompletionTime) { + } else if yym8 { + z.EncBinaryMarshal(x.CompletionTime) + } else if !yym8 && z.IsJSONHandle() { + z.EncJSONMarshal(x.CompletionTime) + } else { + z.EncFallback(x.CompletionTime) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[2] { + x.Phase.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF86553, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("phase")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + x.Phase.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF86553, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd6553) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd6553) + } + } + } +} + +func (x *SnapshotStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap6553 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd6553) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray6553 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr6553) + } + } +} + +func (x *SnapshotStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey6553) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue6553) + switch yys3 { + case "startTime": + if r.TryDecodeAsNil() { + if x.StartTime != nil { + x.StartTime = nil + } + } else { + if x.StartTime == nil { + x.StartTime = new(pkg1_v1.Time) + } + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(x.StartTime) { + } else if yym5 { + z.DecBinaryUnmarshal(x.StartTime) + } else if !yym5 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.StartTime) + } else { + z.DecFallback(x.StartTime, false) + } + } + case "completionTime": + if r.TryDecodeAsNil() { + if x.CompletionTime != nil { + x.CompletionTime = nil + } + } else { + if x.CompletionTime == nil { + x.CompletionTime = new(pkg1_v1.Time) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.DecExt(x.CompletionTime) { + } else if yym7 { + z.DecBinaryUnmarshal(x.CompletionTime) + } else if !yym7 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.CompletionTime) + } else { + z.DecFallback(x.CompletionTime, false) + } + } + case "phase": + if r.TryDecodeAsNil() { + x.Phase = "" + } else { + yyv8 := &x.Phase + yyv8.CodecDecodeSelf(d) + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv9 := &x.Reason + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd6553) +} + +func (x *SnapshotStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer6553 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + if x.StartTime != nil { + x.StartTime = nil + } + } else { + if x.StartTime == nil { + x.StartTime = new(pkg1_v1.Time) + } + yym13 := z.DecBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.DecExt(x.StartTime) { + } else if yym13 { + z.DecBinaryUnmarshal(x.StartTime) + } else if !yym13 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.StartTime) + } else { + z.DecFallback(x.StartTime, false) + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + if x.CompletionTime != nil { + x.CompletionTime = nil + } + } else { + if x.CompletionTime == nil { + x.CompletionTime = new(pkg1_v1.Time) + } + yym15 := z.DecBinary() + _ = yym15 + if false { + } else if z.HasExtensions() && z.DecExt(x.CompletionTime) { + } else if yym15 { + z.DecBinaryUnmarshal(x.CompletionTime) + } else if !yym15 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.CompletionTime) + } else { + z.DecFallback(x.CompletionTime, false) + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.Phase = "" + } else { + yyv16 := &x.Phase + yyv16.CodecDecodeSelf(d) + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + yyv17 := &x.Reason + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + for { + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + z.DecStructFieldNotFound(yyj11-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) +} + +func (x *SnapshotList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + yyq2[3] = len(x.Items) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF86553, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF86553, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF86553, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + if yyq2[3] { + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceSnapshot(([]Snapshot)(x.Items), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey6553) + r.EncodeString(codecSelferC_UTF86553, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue6553) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceSnapshot(([]Snapshot)(x.Items), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd6553) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd6553) + } + } + } +} + +func (x *SnapshotList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap6553 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd6553) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray6553 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr6553) + } + } +} + +func (x *SnapshotList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey6553) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue6553) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceSnapshot((*[]Snapshot)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd6553) +} + +func (x *SnapshotList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer6553 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceSnapshot((*[]Snapshot)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem6553) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd6553) +} + +func (x codecSelfer6553) encSliceSnapshot(v []Snapshot, e *codec1978.Encoder) { + var h codecSelfer6553 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem6553) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd6553) +} + +func (x codecSelfer6553) decSliceSnapshot(v *[]Snapshot, d *codec1978.Decoder) { + var h codecSelfer6553 + 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 = []Snapshot{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 400) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Snapshot, yyrl1) + } + } else { + yyv1 = make([]Snapshot, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Snapshot{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Snapshot{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Snapshot{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Snapshot{}) // var yyz1 Snapshot + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Snapshot{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Snapshot{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/types.generated.go b/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/types.generated.go new file mode 100644 index 000000000..b4658e2e9 --- /dev/null +++ b/vendor/github.com/k8sdb/apimachinery/apis/kubedb/v1alpha1/types.generated.go @@ -0,0 +1,5689 @@ +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1alpha1 + +import ( + "errors" + "fmt" + "reflect" + "runtime" + + codec1978 "github.com/ugorji/go/codec" + pkg2_resource "k8s.io/apimachinery/pkg/api/resource" + pkg1_v1 "k8s.io/client-go/pkg/api/v1" +) + +const ( + // ----- content types ---- + codecSelferC_UTF88190 = 1 + codecSelferC_RAW8190 = 0 + // ----- value types used ---- + codecSelferValueTypeArray8190 = 10 + codecSelferValueTypeMap8190 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey8190 = 2 + codecSelfer_containerMapValue8190 = 3 + codecSelfer_containerMapEnd8190 = 4 + codecSelfer_containerArrayElem8190 = 6 + codecSelfer_containerArrayEnd8190 = 7 +) + +var ( + codecSelferBitsize8190 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr8190 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer8190 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg2_resource.Quantity + var v1 pkg1_v1.VolumeSource + _, _ = v0, v1 + } +} + +func (x *InitSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.ScriptSource != nil + yyq2[1] = x.SnapshotSource != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[0] { + if x.ScriptSource == nil { + r.EncodeNil() + } else { + x.ScriptSource.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("scriptSource")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if x.ScriptSource == nil { + r.EncodeNil() + } else { + x.ScriptSource.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[1] { + if x.SnapshotSource == nil { + r.EncodeNil() + } else { + x.SnapshotSource.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("snapshotSource")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if x.SnapshotSource == nil { + r.EncodeNil() + } else { + x.SnapshotSource.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8190) + } + } + } +} + +func (x *InitSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8190 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8190) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8190 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8190) + } + } +} + +func (x *InitSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8190) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8190) + switch yys3 { + case "scriptSource": + if r.TryDecodeAsNil() { + if x.ScriptSource != nil { + x.ScriptSource = nil + } + } else { + if x.ScriptSource == nil { + x.ScriptSource = new(ScriptSourceSpec) + } + x.ScriptSource.CodecDecodeSelf(d) + } + case "snapshotSource": + if r.TryDecodeAsNil() { + if x.SnapshotSource != nil { + x.SnapshotSource = nil + } + } else { + if x.SnapshotSource == nil { + x.SnapshotSource = new(SnapshotSourceSpec) + } + x.SnapshotSource.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8190) +} + +func (x *InitSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.ScriptSource != nil { + x.ScriptSource = nil + } + } else { + if x.ScriptSource == nil { + x.ScriptSource = new(ScriptSourceSpec) + } + x.ScriptSource.CodecDecodeSelf(d) + } + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.SnapshotSource != nil { + x.SnapshotSource = nil + } + } else { + if x.SnapshotSource == nil { + x.SnapshotSource = new(SnapshotSourceSpec) + } + x.SnapshotSource.CodecDecodeSelf(d) + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) +} + +func (x *ScriptSourceSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [28]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.ScriptPath != "" + yyq2[1] = x.VolumeSource.HostPath != nil && x.HostPath != nil + yyq2[2] = x.VolumeSource.EmptyDir != nil && x.EmptyDir != nil + yyq2[3] = x.VolumeSource.GCEPersistentDisk != nil && x.GCEPersistentDisk != nil + yyq2[4] = x.VolumeSource.AWSElasticBlockStore != nil && x.AWSElasticBlockStore != nil + yyq2[5] = x.VolumeSource.GitRepo != nil && x.GitRepo != nil + yyq2[6] = x.VolumeSource.Secret != nil && x.Secret != nil + yyq2[7] = x.VolumeSource.NFS != nil && x.NFS != nil + yyq2[8] = x.VolumeSource.ISCSI != nil && x.ISCSI != nil + yyq2[9] = x.VolumeSource.Glusterfs != nil && x.Glusterfs != nil + yyq2[10] = x.VolumeSource.PersistentVolumeClaim != nil && x.PersistentVolumeClaim != nil + yyq2[11] = x.VolumeSource.RBD != nil && x.RBD != nil + yyq2[12] = x.VolumeSource.FlexVolume != nil && x.FlexVolume != nil + yyq2[13] = x.VolumeSource.Cinder != nil && x.Cinder != nil + yyq2[14] = x.VolumeSource.CephFS != nil && x.CephFS != nil + yyq2[15] = x.VolumeSource.Flocker != nil && x.Flocker != nil + yyq2[16] = x.VolumeSource.DownwardAPI != nil && x.DownwardAPI != nil + yyq2[17] = x.VolumeSource.FC != nil && x.FC != nil + yyq2[18] = x.VolumeSource.AzureFile != nil && x.AzureFile != nil + yyq2[19] = x.VolumeSource.ConfigMap != nil && x.ConfigMap != nil + yyq2[20] = x.VolumeSource.VsphereVolume != nil && x.VsphereVolume != nil + yyq2[21] = x.VolumeSource.Quobyte != nil && x.Quobyte != nil + yyq2[22] = x.VolumeSource.AzureDisk != nil && x.AzureDisk != nil + yyq2[23] = x.VolumeSource.PhotonPersistentDisk != nil && x.PhotonPersistentDisk != nil + yyq2[24] = x.VolumeSource.Projected != nil && x.Projected != nil + yyq2[25] = x.VolumeSource.PortworxVolume != nil && x.PortworxVolume != nil + yyq2[26] = x.VolumeSource.ScaleIO != nil && x.ScaleIO != nil + yyq2[27] = x.VolumeSource.StorageOS != nil && x.StorageOS != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(28) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.ScriptPath)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("scriptPath")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.ScriptPath)) + } + } + } + var yyn6 bool + if x.VolumeSource.HostPath == nil { + yyn6 = true + goto LABEL6 + } + LABEL6: + if yyr2 || yy2arr2 { + if yyn6 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[1] { + if x.HostPath == nil { + r.EncodeNil() + } else { + x.HostPath.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("hostPath")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn6 { + r.EncodeNil() + } else { + if x.HostPath == nil { + r.EncodeNil() + } else { + x.HostPath.CodecEncodeSelf(e) + } + } + } + } + var yyn9 bool + if x.VolumeSource.EmptyDir == nil { + yyn9 = true + goto LABEL9 + } + LABEL9: + if yyr2 || yy2arr2 { + if yyn9 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[2] { + if x.EmptyDir == nil { + r.EncodeNil() + } else { + x.EmptyDir.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("emptyDir")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn9 { + r.EncodeNil() + } else { + if x.EmptyDir == nil { + r.EncodeNil() + } else { + x.EmptyDir.CodecEncodeSelf(e) + } + } + } + } + var yyn12 bool + if x.VolumeSource.GCEPersistentDisk == nil { + yyn12 = true + goto LABEL12 + } + LABEL12: + if yyr2 || yy2arr2 { + if yyn12 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[3] { + if x.GCEPersistentDisk == nil { + r.EncodeNil() + } else { + x.GCEPersistentDisk.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("gcePersistentDisk")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn12 { + r.EncodeNil() + } else { + if x.GCEPersistentDisk == nil { + r.EncodeNil() + } else { + x.GCEPersistentDisk.CodecEncodeSelf(e) + } + } + } + } + var yyn15 bool + if x.VolumeSource.AWSElasticBlockStore == nil { + yyn15 = true + goto LABEL15 + } + LABEL15: + if yyr2 || yy2arr2 { + if yyn15 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[4] { + if x.AWSElasticBlockStore == nil { + r.EncodeNil() + } else { + x.AWSElasticBlockStore.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("awsElasticBlockStore")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn15 { + r.EncodeNil() + } else { + if x.AWSElasticBlockStore == nil { + r.EncodeNil() + } else { + x.AWSElasticBlockStore.CodecEncodeSelf(e) + } + } + } + } + var yyn18 bool + if x.VolumeSource.GitRepo == nil { + yyn18 = true + goto LABEL18 + } + LABEL18: + if yyr2 || yy2arr2 { + if yyn18 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[5] { + if x.GitRepo == nil { + r.EncodeNil() + } else { + x.GitRepo.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("gitRepo")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn18 { + r.EncodeNil() + } else { + if x.GitRepo == nil { + r.EncodeNil() + } else { + x.GitRepo.CodecEncodeSelf(e) + } + } + } + } + var yyn21 bool + if x.VolumeSource.Secret == nil { + yyn21 = true + goto LABEL21 + } + LABEL21: + if yyr2 || yy2arr2 { + if yyn21 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[6] { + if x.Secret == nil { + r.EncodeNil() + } else { + x.Secret.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("secret")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn21 { + r.EncodeNil() + } else { + if x.Secret == nil { + r.EncodeNil() + } else { + x.Secret.CodecEncodeSelf(e) + } + } + } + } + var yyn24 bool + if x.VolumeSource.NFS == nil { + yyn24 = true + goto LABEL24 + } + LABEL24: + if yyr2 || yy2arr2 { + if yyn24 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[7] { + if x.NFS == nil { + r.EncodeNil() + } else { + x.NFS.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[7] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("nfs")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn24 { + r.EncodeNil() + } else { + if x.NFS == nil { + r.EncodeNil() + } else { + x.NFS.CodecEncodeSelf(e) + } + } + } + } + var yyn27 bool + if x.VolumeSource.ISCSI == nil { + yyn27 = true + goto LABEL27 + } + LABEL27: + if yyr2 || yy2arr2 { + if yyn27 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[8] { + if x.ISCSI == nil { + r.EncodeNil() + } else { + x.ISCSI.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[8] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("iscsi")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn27 { + r.EncodeNil() + } else { + if x.ISCSI == nil { + r.EncodeNil() + } else { + x.ISCSI.CodecEncodeSelf(e) + } + } + } + } + var yyn30 bool + if x.VolumeSource.Glusterfs == nil { + yyn30 = true + goto LABEL30 + } + LABEL30: + if yyr2 || yy2arr2 { + if yyn30 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[9] { + if x.Glusterfs == nil { + r.EncodeNil() + } else { + x.Glusterfs.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[9] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("glusterfs")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn30 { + r.EncodeNil() + } else { + if x.Glusterfs == nil { + r.EncodeNil() + } else { + x.Glusterfs.CodecEncodeSelf(e) + } + } + } + } + var yyn33 bool + if x.VolumeSource.PersistentVolumeClaim == nil { + yyn33 = true + goto LABEL33 + } + LABEL33: + if yyr2 || yy2arr2 { + if yyn33 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[10] { + if x.PersistentVolumeClaim == nil { + r.EncodeNil() + } else { + x.PersistentVolumeClaim.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[10] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("persistentVolumeClaim")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn33 { + r.EncodeNil() + } else { + if x.PersistentVolumeClaim == nil { + r.EncodeNil() + } else { + x.PersistentVolumeClaim.CodecEncodeSelf(e) + } + } + } + } + var yyn36 bool + if x.VolumeSource.RBD == nil { + yyn36 = true + goto LABEL36 + } + LABEL36: + if yyr2 || yy2arr2 { + if yyn36 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[11] { + if x.RBD == nil { + r.EncodeNil() + } else { + x.RBD.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[11] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("rbd")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn36 { + r.EncodeNil() + } else { + if x.RBD == nil { + r.EncodeNil() + } else { + x.RBD.CodecEncodeSelf(e) + } + } + } + } + var yyn39 bool + if x.VolumeSource.FlexVolume == nil { + yyn39 = true + goto LABEL39 + } + LABEL39: + if yyr2 || yy2arr2 { + if yyn39 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[12] { + if x.FlexVolume == nil { + r.EncodeNil() + } else { + x.FlexVolume.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[12] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("flexVolume")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn39 { + r.EncodeNil() + } else { + if x.FlexVolume == nil { + r.EncodeNil() + } else { + x.FlexVolume.CodecEncodeSelf(e) + } + } + } + } + var yyn42 bool + if x.VolumeSource.Cinder == nil { + yyn42 = true + goto LABEL42 + } + LABEL42: + if yyr2 || yy2arr2 { + if yyn42 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[13] { + if x.Cinder == nil { + r.EncodeNil() + } else { + x.Cinder.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[13] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("cinder")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn42 { + r.EncodeNil() + } else { + if x.Cinder == nil { + r.EncodeNil() + } else { + x.Cinder.CodecEncodeSelf(e) + } + } + } + } + var yyn45 bool + if x.VolumeSource.CephFS == nil { + yyn45 = true + goto LABEL45 + } + LABEL45: + if yyr2 || yy2arr2 { + if yyn45 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[14] { + if x.CephFS == nil { + r.EncodeNil() + } else { + x.CephFS.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[14] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("cephfs")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn45 { + r.EncodeNil() + } else { + if x.CephFS == nil { + r.EncodeNil() + } else { + x.CephFS.CodecEncodeSelf(e) + } + } + } + } + var yyn48 bool + if x.VolumeSource.Flocker == nil { + yyn48 = true + goto LABEL48 + } + LABEL48: + if yyr2 || yy2arr2 { + if yyn48 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[15] { + if x.Flocker == nil { + r.EncodeNil() + } else { + x.Flocker.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[15] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("flocker")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn48 { + r.EncodeNil() + } else { + if x.Flocker == nil { + r.EncodeNil() + } else { + x.Flocker.CodecEncodeSelf(e) + } + } + } + } + var yyn51 bool + if x.VolumeSource.DownwardAPI == nil { + yyn51 = true + goto LABEL51 + } + LABEL51: + if yyr2 || yy2arr2 { + if yyn51 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[16] { + if x.DownwardAPI == nil { + r.EncodeNil() + } else { + x.DownwardAPI.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[16] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("downwardAPI")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn51 { + r.EncodeNil() + } else { + if x.DownwardAPI == nil { + r.EncodeNil() + } else { + x.DownwardAPI.CodecEncodeSelf(e) + } + } + } + } + var yyn54 bool + if x.VolumeSource.FC == nil { + yyn54 = true + goto LABEL54 + } + LABEL54: + if yyr2 || yy2arr2 { + if yyn54 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[17] { + if x.FC == nil { + r.EncodeNil() + } else { + x.FC.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[17] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("fc")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn54 { + r.EncodeNil() + } else { + if x.FC == nil { + r.EncodeNil() + } else { + x.FC.CodecEncodeSelf(e) + } + } + } + } + var yyn57 bool + if x.VolumeSource.AzureFile == nil { + yyn57 = true + goto LABEL57 + } + LABEL57: + if yyr2 || yy2arr2 { + if yyn57 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[18] { + if x.AzureFile == nil { + r.EncodeNil() + } else { + x.AzureFile.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[18] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("azureFile")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn57 { + r.EncodeNil() + } else { + if x.AzureFile == nil { + r.EncodeNil() + } else { + x.AzureFile.CodecEncodeSelf(e) + } + } + } + } + var yyn60 bool + if x.VolumeSource.ConfigMap == nil { + yyn60 = true + goto LABEL60 + } + LABEL60: + if yyr2 || yy2arr2 { + if yyn60 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[19] { + if x.ConfigMap == nil { + r.EncodeNil() + } else { + x.ConfigMap.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[19] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("configMap")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn60 { + r.EncodeNil() + } else { + if x.ConfigMap == nil { + r.EncodeNil() + } else { + x.ConfigMap.CodecEncodeSelf(e) + } + } + } + } + var yyn63 bool + if x.VolumeSource.VsphereVolume == nil { + yyn63 = true + goto LABEL63 + } + LABEL63: + if yyr2 || yy2arr2 { + if yyn63 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[20] { + if x.VsphereVolume == nil { + r.EncodeNil() + } else { + x.VsphereVolume.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[20] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("vsphereVolume")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn63 { + r.EncodeNil() + } else { + if x.VsphereVolume == nil { + r.EncodeNil() + } else { + x.VsphereVolume.CodecEncodeSelf(e) + } + } + } + } + var yyn66 bool + if x.VolumeSource.Quobyte == nil { + yyn66 = true + goto LABEL66 + } + LABEL66: + if yyr2 || yy2arr2 { + if yyn66 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[21] { + if x.Quobyte == nil { + r.EncodeNil() + } else { + x.Quobyte.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[21] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("quobyte")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn66 { + r.EncodeNil() + } else { + if x.Quobyte == nil { + r.EncodeNil() + } else { + x.Quobyte.CodecEncodeSelf(e) + } + } + } + } + var yyn69 bool + if x.VolumeSource.AzureDisk == nil { + yyn69 = true + goto LABEL69 + } + LABEL69: + if yyr2 || yy2arr2 { + if yyn69 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[22] { + if x.AzureDisk == nil { + r.EncodeNil() + } else { + x.AzureDisk.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[22] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("azureDisk")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn69 { + r.EncodeNil() + } else { + if x.AzureDisk == nil { + r.EncodeNil() + } else { + x.AzureDisk.CodecEncodeSelf(e) + } + } + } + } + var yyn72 bool + if x.VolumeSource.PhotonPersistentDisk == nil { + yyn72 = true + goto LABEL72 + } + LABEL72: + if yyr2 || yy2arr2 { + if yyn72 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[23] { + if x.PhotonPersistentDisk == nil { + r.EncodeNil() + } else { + x.PhotonPersistentDisk.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[23] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("photonPersistentDisk")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn72 { + r.EncodeNil() + } else { + if x.PhotonPersistentDisk == nil { + r.EncodeNil() + } else { + x.PhotonPersistentDisk.CodecEncodeSelf(e) + } + } + } + } + var yyn75 bool + if x.VolumeSource.Projected == nil { + yyn75 = true + goto LABEL75 + } + LABEL75: + if yyr2 || yy2arr2 { + if yyn75 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[24] { + if x.Projected == nil { + r.EncodeNil() + } else { + x.Projected.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[24] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("projected")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn75 { + r.EncodeNil() + } else { + if x.Projected == nil { + r.EncodeNil() + } else { + x.Projected.CodecEncodeSelf(e) + } + } + } + } + var yyn78 bool + if x.VolumeSource.PortworxVolume == nil { + yyn78 = true + goto LABEL78 + } + LABEL78: + if yyr2 || yy2arr2 { + if yyn78 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[25] { + if x.PortworxVolume == nil { + r.EncodeNil() + } else { + x.PortworxVolume.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[25] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("portworxVolume")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn78 { + r.EncodeNil() + } else { + if x.PortworxVolume == nil { + r.EncodeNil() + } else { + x.PortworxVolume.CodecEncodeSelf(e) + } + } + } + } + var yyn81 bool + if x.VolumeSource.ScaleIO == nil { + yyn81 = true + goto LABEL81 + } + LABEL81: + if yyr2 || yy2arr2 { + if yyn81 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[26] { + if x.ScaleIO == nil { + r.EncodeNil() + } else { + x.ScaleIO.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[26] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("scaleIO")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn81 { + r.EncodeNil() + } else { + if x.ScaleIO == nil { + r.EncodeNil() + } else { + x.ScaleIO.CodecEncodeSelf(e) + } + } + } + } + var yyn84 bool + if x.VolumeSource.StorageOS == nil { + yyn84 = true + goto LABEL84 + } + LABEL84: + if yyr2 || yy2arr2 { + if yyn84 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[27] { + if x.StorageOS == nil { + r.EncodeNil() + } else { + x.StorageOS.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[27] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("storageos")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn84 { + r.EncodeNil() + } else { + if x.StorageOS == nil { + r.EncodeNil() + } else { + x.StorageOS.CodecEncodeSelf(e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8190) + } + } + } +} + +func (x *ScriptSourceSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8190 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8190) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8190 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8190) + } + } +} + +func (x *ScriptSourceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8190) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8190) + switch yys3 { + case "scriptPath": + if r.TryDecodeAsNil() { + x.ScriptPath = "" + } else { + yyv4 := &x.ScriptPath + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "hostPath": + if x.VolumeSource.HostPath == nil { + x.VolumeSource.HostPath = new(pkg1_v1.HostPathVolumeSource) + } + if r.TryDecodeAsNil() { + if x.HostPath != nil { + x.HostPath = nil + } + } else { + if x.HostPath == nil { + x.HostPath = new(pkg1_v1.HostPathVolumeSource) + } + x.HostPath.CodecDecodeSelf(d) + } + case "emptyDir": + if x.VolumeSource.EmptyDir == nil { + x.VolumeSource.EmptyDir = new(pkg1_v1.EmptyDirVolumeSource) + } + if r.TryDecodeAsNil() { + if x.EmptyDir != nil { + x.EmptyDir = nil + } + } else { + if x.EmptyDir == nil { + x.EmptyDir = new(pkg1_v1.EmptyDirVolumeSource) + } + x.EmptyDir.CodecDecodeSelf(d) + } + case "gcePersistentDisk": + if x.VolumeSource.GCEPersistentDisk == nil { + x.VolumeSource.GCEPersistentDisk = new(pkg1_v1.GCEPersistentDiskVolumeSource) + } + if r.TryDecodeAsNil() { + if x.GCEPersistentDisk != nil { + x.GCEPersistentDisk = nil + } + } else { + if x.GCEPersistentDisk == nil { + x.GCEPersistentDisk = new(pkg1_v1.GCEPersistentDiskVolumeSource) + } + x.GCEPersistentDisk.CodecDecodeSelf(d) + } + case "awsElasticBlockStore": + if x.VolumeSource.AWSElasticBlockStore == nil { + x.VolumeSource.AWSElasticBlockStore = new(pkg1_v1.AWSElasticBlockStoreVolumeSource) + } + if r.TryDecodeAsNil() { + if x.AWSElasticBlockStore != nil { + x.AWSElasticBlockStore = nil + } + } else { + if x.AWSElasticBlockStore == nil { + x.AWSElasticBlockStore = new(pkg1_v1.AWSElasticBlockStoreVolumeSource) + } + x.AWSElasticBlockStore.CodecDecodeSelf(d) + } + case "gitRepo": + if x.VolumeSource.GitRepo == nil { + x.VolumeSource.GitRepo = new(pkg1_v1.GitRepoVolumeSource) + } + if r.TryDecodeAsNil() { + if x.GitRepo != nil { + x.GitRepo = nil + } + } else { + if x.GitRepo == nil { + x.GitRepo = new(pkg1_v1.GitRepoVolumeSource) + } + x.GitRepo.CodecDecodeSelf(d) + } + case "secret": + if x.VolumeSource.Secret == nil { + x.VolumeSource.Secret = new(pkg1_v1.SecretVolumeSource) + } + if r.TryDecodeAsNil() { + if x.Secret != nil { + x.Secret = nil + } + } else { + if x.Secret == nil { + x.Secret = new(pkg1_v1.SecretVolumeSource) + } + x.Secret.CodecDecodeSelf(d) + } + case "nfs": + if x.VolumeSource.NFS == nil { + x.VolumeSource.NFS = new(pkg1_v1.NFSVolumeSource) + } + if r.TryDecodeAsNil() { + if x.NFS != nil { + x.NFS = nil + } + } else { + if x.NFS == nil { + x.NFS = new(pkg1_v1.NFSVolumeSource) + } + x.NFS.CodecDecodeSelf(d) + } + case "iscsi": + if x.VolumeSource.ISCSI == nil { + x.VolumeSource.ISCSI = new(pkg1_v1.ISCSIVolumeSource) + } + if r.TryDecodeAsNil() { + if x.ISCSI != nil { + x.ISCSI = nil + } + } else { + if x.ISCSI == nil { + x.ISCSI = new(pkg1_v1.ISCSIVolumeSource) + } + x.ISCSI.CodecDecodeSelf(d) + } + case "glusterfs": + if x.VolumeSource.Glusterfs == nil { + x.VolumeSource.Glusterfs = new(pkg1_v1.GlusterfsVolumeSource) + } + if r.TryDecodeAsNil() { + if x.Glusterfs != nil { + x.Glusterfs = nil + } + } else { + if x.Glusterfs == nil { + x.Glusterfs = new(pkg1_v1.GlusterfsVolumeSource) + } + x.Glusterfs.CodecDecodeSelf(d) + } + case "persistentVolumeClaim": + if x.VolumeSource.PersistentVolumeClaim == nil { + x.VolumeSource.PersistentVolumeClaim = new(pkg1_v1.PersistentVolumeClaimVolumeSource) + } + if r.TryDecodeAsNil() { + if x.PersistentVolumeClaim != nil { + x.PersistentVolumeClaim = nil + } + } else { + if x.PersistentVolumeClaim == nil { + x.PersistentVolumeClaim = new(pkg1_v1.PersistentVolumeClaimVolumeSource) + } + x.PersistentVolumeClaim.CodecDecodeSelf(d) + } + case "rbd": + if x.VolumeSource.RBD == nil { + x.VolumeSource.RBD = new(pkg1_v1.RBDVolumeSource) + } + if r.TryDecodeAsNil() { + if x.RBD != nil { + x.RBD = nil + } + } else { + if x.RBD == nil { + x.RBD = new(pkg1_v1.RBDVolumeSource) + } + x.RBD.CodecDecodeSelf(d) + } + case "flexVolume": + if x.VolumeSource.FlexVolume == nil { + x.VolumeSource.FlexVolume = new(pkg1_v1.FlexVolumeSource) + } + if r.TryDecodeAsNil() { + if x.FlexVolume != nil { + x.FlexVolume = nil + } + } else { + if x.FlexVolume == nil { + x.FlexVolume = new(pkg1_v1.FlexVolumeSource) + } + x.FlexVolume.CodecDecodeSelf(d) + } + case "cinder": + if x.VolumeSource.Cinder == nil { + x.VolumeSource.Cinder = new(pkg1_v1.CinderVolumeSource) + } + if r.TryDecodeAsNil() { + if x.Cinder != nil { + x.Cinder = nil + } + } else { + if x.Cinder == nil { + x.Cinder = new(pkg1_v1.CinderVolumeSource) + } + x.Cinder.CodecDecodeSelf(d) + } + case "cephfs": + if x.VolumeSource.CephFS == nil { + x.VolumeSource.CephFS = new(pkg1_v1.CephFSVolumeSource) + } + if r.TryDecodeAsNil() { + if x.CephFS != nil { + x.CephFS = nil + } + } else { + if x.CephFS == nil { + x.CephFS = new(pkg1_v1.CephFSVolumeSource) + } + x.CephFS.CodecDecodeSelf(d) + } + case "flocker": + if x.VolumeSource.Flocker == nil { + x.VolumeSource.Flocker = new(pkg1_v1.FlockerVolumeSource) + } + if r.TryDecodeAsNil() { + if x.Flocker != nil { + x.Flocker = nil + } + } else { + if x.Flocker == nil { + x.Flocker = new(pkg1_v1.FlockerVolumeSource) + } + x.Flocker.CodecDecodeSelf(d) + } + case "downwardAPI": + if x.VolumeSource.DownwardAPI == nil { + x.VolumeSource.DownwardAPI = new(pkg1_v1.DownwardAPIVolumeSource) + } + if r.TryDecodeAsNil() { + if x.DownwardAPI != nil { + x.DownwardAPI = nil + } + } else { + if x.DownwardAPI == nil { + x.DownwardAPI = new(pkg1_v1.DownwardAPIVolumeSource) + } + x.DownwardAPI.CodecDecodeSelf(d) + } + case "fc": + if x.VolumeSource.FC == nil { + x.VolumeSource.FC = new(pkg1_v1.FCVolumeSource) + } + if r.TryDecodeAsNil() { + if x.FC != nil { + x.FC = nil + } + } else { + if x.FC == nil { + x.FC = new(pkg1_v1.FCVolumeSource) + } + x.FC.CodecDecodeSelf(d) + } + case "azureFile": + if x.VolumeSource.AzureFile == nil { + x.VolumeSource.AzureFile = new(pkg1_v1.AzureFileVolumeSource) + } + if r.TryDecodeAsNil() { + if x.AzureFile != nil { + x.AzureFile = nil + } + } else { + if x.AzureFile == nil { + x.AzureFile = new(pkg1_v1.AzureFileVolumeSource) + } + x.AzureFile.CodecDecodeSelf(d) + } + case "configMap": + if x.VolumeSource.ConfigMap == nil { + x.VolumeSource.ConfigMap = new(pkg1_v1.ConfigMapVolumeSource) + } + if r.TryDecodeAsNil() { + if x.ConfigMap != nil { + x.ConfigMap = nil + } + } else { + if x.ConfigMap == nil { + x.ConfigMap = new(pkg1_v1.ConfigMapVolumeSource) + } + x.ConfigMap.CodecDecodeSelf(d) + } + case "vsphereVolume": + if x.VolumeSource.VsphereVolume == nil { + x.VolumeSource.VsphereVolume = new(pkg1_v1.VsphereVirtualDiskVolumeSource) + } + if r.TryDecodeAsNil() { + if x.VsphereVolume != nil { + x.VsphereVolume = nil + } + } else { + if x.VsphereVolume == nil { + x.VsphereVolume = new(pkg1_v1.VsphereVirtualDiskVolumeSource) + } + x.VsphereVolume.CodecDecodeSelf(d) + } + case "quobyte": + if x.VolumeSource.Quobyte == nil { + x.VolumeSource.Quobyte = new(pkg1_v1.QuobyteVolumeSource) + } + if r.TryDecodeAsNil() { + if x.Quobyte != nil { + x.Quobyte = nil + } + } else { + if x.Quobyte == nil { + x.Quobyte = new(pkg1_v1.QuobyteVolumeSource) + } + x.Quobyte.CodecDecodeSelf(d) + } + case "azureDisk": + if x.VolumeSource.AzureDisk == nil { + x.VolumeSource.AzureDisk = new(pkg1_v1.AzureDiskVolumeSource) + } + if r.TryDecodeAsNil() { + if x.AzureDisk != nil { + x.AzureDisk = nil + } + } else { + if x.AzureDisk == nil { + x.AzureDisk = new(pkg1_v1.AzureDiskVolumeSource) + } + x.AzureDisk.CodecDecodeSelf(d) + } + case "photonPersistentDisk": + if x.VolumeSource.PhotonPersistentDisk == nil { + x.VolumeSource.PhotonPersistentDisk = new(pkg1_v1.PhotonPersistentDiskVolumeSource) + } + if r.TryDecodeAsNil() { + if x.PhotonPersistentDisk != nil { + x.PhotonPersistentDisk = nil + } + } else { + if x.PhotonPersistentDisk == nil { + x.PhotonPersistentDisk = new(pkg1_v1.PhotonPersistentDiskVolumeSource) + } + x.PhotonPersistentDisk.CodecDecodeSelf(d) + } + case "projected": + if x.VolumeSource.Projected == nil { + x.VolumeSource.Projected = new(pkg1_v1.ProjectedVolumeSource) + } + if r.TryDecodeAsNil() { + if x.Projected != nil { + x.Projected = nil + } + } else { + if x.Projected == nil { + x.Projected = new(pkg1_v1.ProjectedVolumeSource) + } + x.Projected.CodecDecodeSelf(d) + } + case "portworxVolume": + if x.VolumeSource.PortworxVolume == nil { + x.VolumeSource.PortworxVolume = new(pkg1_v1.PortworxVolumeSource) + } + if r.TryDecodeAsNil() { + if x.PortworxVolume != nil { + x.PortworxVolume = nil + } + } else { + if x.PortworxVolume == nil { + x.PortworxVolume = new(pkg1_v1.PortworxVolumeSource) + } + x.PortworxVolume.CodecDecodeSelf(d) + } + case "scaleIO": + if x.VolumeSource.ScaleIO == nil { + x.VolumeSource.ScaleIO = new(pkg1_v1.ScaleIOVolumeSource) + } + if r.TryDecodeAsNil() { + if x.ScaleIO != nil { + x.ScaleIO = nil + } + } else { + if x.ScaleIO == nil { + x.ScaleIO = new(pkg1_v1.ScaleIOVolumeSource) + } + x.ScaleIO.CodecDecodeSelf(d) + } + case "storageos": + if x.VolumeSource.StorageOS == nil { + x.VolumeSource.StorageOS = new(pkg1_v1.StorageOSVolumeSource) + } + if r.TryDecodeAsNil() { + if x.StorageOS != nil { + x.StorageOS = nil + } + } else { + if x.StorageOS == nil { + x.StorageOS = new(pkg1_v1.StorageOSVolumeSource) + } + x.StorageOS.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8190) +} + +func (x *ScriptSourceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj33 int + var yyb33 bool + var yyhl33 bool = l >= 0 + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.ScriptPath = "" + } else { + yyv34 := &x.ScriptPath + yym35 := z.DecBinary() + _ = yym35 + if false { + } else { + *((*string)(yyv34)) = r.DecodeString() + } + } + if x.VolumeSource.HostPath == nil { + x.VolumeSource.HostPath = new(pkg1_v1.HostPathVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.HostPath != nil { + x.HostPath = nil + } + } else { + if x.HostPath == nil { + x.HostPath = new(pkg1_v1.HostPathVolumeSource) + } + x.HostPath.CodecDecodeSelf(d) + } + if x.VolumeSource.EmptyDir == nil { + x.VolumeSource.EmptyDir = new(pkg1_v1.EmptyDirVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.EmptyDir != nil { + x.EmptyDir = nil + } + } else { + if x.EmptyDir == nil { + x.EmptyDir = new(pkg1_v1.EmptyDirVolumeSource) + } + x.EmptyDir.CodecDecodeSelf(d) + } + if x.VolumeSource.GCEPersistentDisk == nil { + x.VolumeSource.GCEPersistentDisk = new(pkg1_v1.GCEPersistentDiskVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.GCEPersistentDisk != nil { + x.GCEPersistentDisk = nil + } + } else { + if x.GCEPersistentDisk == nil { + x.GCEPersistentDisk = new(pkg1_v1.GCEPersistentDiskVolumeSource) + } + x.GCEPersistentDisk.CodecDecodeSelf(d) + } + if x.VolumeSource.AWSElasticBlockStore == nil { + x.VolumeSource.AWSElasticBlockStore = new(pkg1_v1.AWSElasticBlockStoreVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.AWSElasticBlockStore != nil { + x.AWSElasticBlockStore = nil + } + } else { + if x.AWSElasticBlockStore == nil { + x.AWSElasticBlockStore = new(pkg1_v1.AWSElasticBlockStoreVolumeSource) + } + x.AWSElasticBlockStore.CodecDecodeSelf(d) + } + if x.VolumeSource.GitRepo == nil { + x.VolumeSource.GitRepo = new(pkg1_v1.GitRepoVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.GitRepo != nil { + x.GitRepo = nil + } + } else { + if x.GitRepo == nil { + x.GitRepo = new(pkg1_v1.GitRepoVolumeSource) + } + x.GitRepo.CodecDecodeSelf(d) + } + if x.VolumeSource.Secret == nil { + x.VolumeSource.Secret = new(pkg1_v1.SecretVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Secret != nil { + x.Secret = nil + } + } else { + if x.Secret == nil { + x.Secret = new(pkg1_v1.SecretVolumeSource) + } + x.Secret.CodecDecodeSelf(d) + } + if x.VolumeSource.NFS == nil { + x.VolumeSource.NFS = new(pkg1_v1.NFSVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.NFS != nil { + x.NFS = nil + } + } else { + if x.NFS == nil { + x.NFS = new(pkg1_v1.NFSVolumeSource) + } + x.NFS.CodecDecodeSelf(d) + } + if x.VolumeSource.ISCSI == nil { + x.VolumeSource.ISCSI = new(pkg1_v1.ISCSIVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.ISCSI != nil { + x.ISCSI = nil + } + } else { + if x.ISCSI == nil { + x.ISCSI = new(pkg1_v1.ISCSIVolumeSource) + } + x.ISCSI.CodecDecodeSelf(d) + } + if x.VolumeSource.Glusterfs == nil { + x.VolumeSource.Glusterfs = new(pkg1_v1.GlusterfsVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Glusterfs != nil { + x.Glusterfs = nil + } + } else { + if x.Glusterfs == nil { + x.Glusterfs = new(pkg1_v1.GlusterfsVolumeSource) + } + x.Glusterfs.CodecDecodeSelf(d) + } + if x.VolumeSource.PersistentVolumeClaim == nil { + x.VolumeSource.PersistentVolumeClaim = new(pkg1_v1.PersistentVolumeClaimVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.PersistentVolumeClaim != nil { + x.PersistentVolumeClaim = nil + } + } else { + if x.PersistentVolumeClaim == nil { + x.PersistentVolumeClaim = new(pkg1_v1.PersistentVolumeClaimVolumeSource) + } + x.PersistentVolumeClaim.CodecDecodeSelf(d) + } + if x.VolumeSource.RBD == nil { + x.VolumeSource.RBD = new(pkg1_v1.RBDVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.RBD != nil { + x.RBD = nil + } + } else { + if x.RBD == nil { + x.RBD = new(pkg1_v1.RBDVolumeSource) + } + x.RBD.CodecDecodeSelf(d) + } + if x.VolumeSource.FlexVolume == nil { + x.VolumeSource.FlexVolume = new(pkg1_v1.FlexVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.FlexVolume != nil { + x.FlexVolume = nil + } + } else { + if x.FlexVolume == nil { + x.FlexVolume = new(pkg1_v1.FlexVolumeSource) + } + x.FlexVolume.CodecDecodeSelf(d) + } + if x.VolumeSource.Cinder == nil { + x.VolumeSource.Cinder = new(pkg1_v1.CinderVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Cinder != nil { + x.Cinder = nil + } + } else { + if x.Cinder == nil { + x.Cinder = new(pkg1_v1.CinderVolumeSource) + } + x.Cinder.CodecDecodeSelf(d) + } + if x.VolumeSource.CephFS == nil { + x.VolumeSource.CephFS = new(pkg1_v1.CephFSVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.CephFS != nil { + x.CephFS = nil + } + } else { + if x.CephFS == nil { + x.CephFS = new(pkg1_v1.CephFSVolumeSource) + } + x.CephFS.CodecDecodeSelf(d) + } + if x.VolumeSource.Flocker == nil { + x.VolumeSource.Flocker = new(pkg1_v1.FlockerVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Flocker != nil { + x.Flocker = nil + } + } else { + if x.Flocker == nil { + x.Flocker = new(pkg1_v1.FlockerVolumeSource) + } + x.Flocker.CodecDecodeSelf(d) + } + if x.VolumeSource.DownwardAPI == nil { + x.VolumeSource.DownwardAPI = new(pkg1_v1.DownwardAPIVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.DownwardAPI != nil { + x.DownwardAPI = nil + } + } else { + if x.DownwardAPI == nil { + x.DownwardAPI = new(pkg1_v1.DownwardAPIVolumeSource) + } + x.DownwardAPI.CodecDecodeSelf(d) + } + if x.VolumeSource.FC == nil { + x.VolumeSource.FC = new(pkg1_v1.FCVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.FC != nil { + x.FC = nil + } + } else { + if x.FC == nil { + x.FC = new(pkg1_v1.FCVolumeSource) + } + x.FC.CodecDecodeSelf(d) + } + if x.VolumeSource.AzureFile == nil { + x.VolumeSource.AzureFile = new(pkg1_v1.AzureFileVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.AzureFile != nil { + x.AzureFile = nil + } + } else { + if x.AzureFile == nil { + x.AzureFile = new(pkg1_v1.AzureFileVolumeSource) + } + x.AzureFile.CodecDecodeSelf(d) + } + if x.VolumeSource.ConfigMap == nil { + x.VolumeSource.ConfigMap = new(pkg1_v1.ConfigMapVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.ConfigMap != nil { + x.ConfigMap = nil + } + } else { + if x.ConfigMap == nil { + x.ConfigMap = new(pkg1_v1.ConfigMapVolumeSource) + } + x.ConfigMap.CodecDecodeSelf(d) + } + if x.VolumeSource.VsphereVolume == nil { + x.VolumeSource.VsphereVolume = new(pkg1_v1.VsphereVirtualDiskVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.VsphereVolume != nil { + x.VsphereVolume = nil + } + } else { + if x.VsphereVolume == nil { + x.VsphereVolume = new(pkg1_v1.VsphereVirtualDiskVolumeSource) + } + x.VsphereVolume.CodecDecodeSelf(d) + } + if x.VolumeSource.Quobyte == nil { + x.VolumeSource.Quobyte = new(pkg1_v1.QuobyteVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Quobyte != nil { + x.Quobyte = nil + } + } else { + if x.Quobyte == nil { + x.Quobyte = new(pkg1_v1.QuobyteVolumeSource) + } + x.Quobyte.CodecDecodeSelf(d) + } + if x.VolumeSource.AzureDisk == nil { + x.VolumeSource.AzureDisk = new(pkg1_v1.AzureDiskVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.AzureDisk != nil { + x.AzureDisk = nil + } + } else { + if x.AzureDisk == nil { + x.AzureDisk = new(pkg1_v1.AzureDiskVolumeSource) + } + x.AzureDisk.CodecDecodeSelf(d) + } + if x.VolumeSource.PhotonPersistentDisk == nil { + x.VolumeSource.PhotonPersistentDisk = new(pkg1_v1.PhotonPersistentDiskVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.PhotonPersistentDisk != nil { + x.PhotonPersistentDisk = nil + } + } else { + if x.PhotonPersistentDisk == nil { + x.PhotonPersistentDisk = new(pkg1_v1.PhotonPersistentDiskVolumeSource) + } + x.PhotonPersistentDisk.CodecDecodeSelf(d) + } + if x.VolumeSource.Projected == nil { + x.VolumeSource.Projected = new(pkg1_v1.ProjectedVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Projected != nil { + x.Projected = nil + } + } else { + if x.Projected == nil { + x.Projected = new(pkg1_v1.ProjectedVolumeSource) + } + x.Projected.CodecDecodeSelf(d) + } + if x.VolumeSource.PortworxVolume == nil { + x.VolumeSource.PortworxVolume = new(pkg1_v1.PortworxVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.PortworxVolume != nil { + x.PortworxVolume = nil + } + } else { + if x.PortworxVolume == nil { + x.PortworxVolume = new(pkg1_v1.PortworxVolumeSource) + } + x.PortworxVolume.CodecDecodeSelf(d) + } + if x.VolumeSource.ScaleIO == nil { + x.VolumeSource.ScaleIO = new(pkg1_v1.ScaleIOVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.ScaleIO != nil { + x.ScaleIO = nil + } + } else { + if x.ScaleIO == nil { + x.ScaleIO = new(pkg1_v1.ScaleIOVolumeSource) + } + x.ScaleIO.CodecDecodeSelf(d) + } + if x.VolumeSource.StorageOS == nil { + x.VolumeSource.StorageOS = new(pkg1_v1.StorageOSVolumeSource) + } + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.StorageOS != nil { + x.StorageOS = nil + } + } else { + if x.StorageOS == nil { + x.StorageOS = new(pkg1_v1.StorageOSVolumeSource) + } + x.StorageOS.CodecDecodeSelf(d) + } + for { + yyj33++ + if yyhl33 { + yyb33 = yyj33 > l + } else { + yyb33 = r.CheckBreak() + } + if yyb33 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + z.DecStructFieldNotFound(yyj33-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) +} + +func (x *SnapshotSourceSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Namespace != "" + yyq2[1] = x.Name != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Namespace)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("namespace")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Namespace)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Name)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Name)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8190) + } + } + } +} + +func (x *SnapshotSourceSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8190 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8190) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8190 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8190) + } + } +} + +func (x *SnapshotSourceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8190) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8190) + switch yys3 { + case "namespace": + if r.TryDecodeAsNil() { + x.Namespace = "" + } else { + yyv4 := &x.Namespace + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv6 := &x.Name + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8190) +} + +func (x *SnapshotSourceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Namespace = "" + } else { + yyv9 := &x.Namespace + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv11 := &x.Name + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) +} + +func (x *BackupScheduleSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [8]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.CronExpression != "" + yyq2[1] = x.StorageSecretName != "" + yyq2[2] = x.SnapshotStorageSpec.Local != nil && x.Local != nil + yyq2[3] = x.SnapshotStorageSpec.S3 != nil && x.S3 != nil + yyq2[4] = x.SnapshotStorageSpec.GCS != nil && x.GCS != nil + yyq2[5] = x.SnapshotStorageSpec.Azure != nil && x.Azure != nil + yyq2[6] = x.SnapshotStorageSpec.Swift != nil && x.Swift != nil + yyq2[7] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(8) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.CronExpression)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("cronExpression")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.CronExpression)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.StorageSecretName)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("storageSecretName")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.StorageSecretName)) + } + } + } + var yyn9 bool + if x.SnapshotStorageSpec.Local == nil { + yyn9 = true + goto LABEL9 + } + LABEL9: + if yyr2 || yy2arr2 { + if yyn9 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[2] { + if x.Local == nil { + r.EncodeNil() + } else { + x.Local.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("local")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn9 { + r.EncodeNil() + } else { + if x.Local == nil { + r.EncodeNil() + } else { + x.Local.CodecEncodeSelf(e) + } + } + } + } + var yyn12 bool + if x.SnapshotStorageSpec.S3 == nil { + yyn12 = true + goto LABEL12 + } + LABEL12: + if yyr2 || yy2arr2 { + if yyn12 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[3] { + if x.S3 == nil { + r.EncodeNil() + } else { + x.S3.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("s3")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn12 { + r.EncodeNil() + } else { + if x.S3 == nil { + r.EncodeNil() + } else { + x.S3.CodecEncodeSelf(e) + } + } + } + } + var yyn15 bool + if x.SnapshotStorageSpec.GCS == nil { + yyn15 = true + goto LABEL15 + } + LABEL15: + if yyr2 || yy2arr2 { + if yyn15 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[4] { + if x.GCS == nil { + r.EncodeNil() + } else { + x.GCS.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("gcs")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn15 { + r.EncodeNil() + } else { + if x.GCS == nil { + r.EncodeNil() + } else { + x.GCS.CodecEncodeSelf(e) + } + } + } + } + var yyn18 bool + if x.SnapshotStorageSpec.Azure == nil { + yyn18 = true + goto LABEL18 + } + LABEL18: + if yyr2 || yy2arr2 { + if yyn18 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[5] { + if x.Azure == nil { + r.EncodeNil() + } else { + x.Azure.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("azure")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn18 { + r.EncodeNil() + } else { + if x.Azure == nil { + r.EncodeNil() + } else { + x.Azure.CodecEncodeSelf(e) + } + } + } + } + var yyn21 bool + if x.SnapshotStorageSpec.Swift == nil { + yyn21 = true + goto LABEL21 + } + LABEL21: + if yyr2 || yy2arr2 { + if yyn21 { + r.EncodeNil() + } else { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[6] { + if x.Swift == nil { + r.EncodeNil() + } else { + x.Swift.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } + } else { + if yyq2[6] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("swift")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if yyn21 { + r.EncodeNil() + } else { + if x.Swift == nil { + r.EncodeNil() + } else { + x.Swift.CodecEncodeSelf(e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[7] { + yy25 := &x.Resources + yy25.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[7] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("resources")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yy27 := &x.Resources + yy27.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8190) + } + } + } +} + +func (x *BackupScheduleSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8190 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8190) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8190 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8190) + } + } +} + +func (x *BackupScheduleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8190) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8190) + switch yys3 { + case "cronExpression": + if r.TryDecodeAsNil() { + x.CronExpression = "" + } else { + yyv4 := &x.CronExpression + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "storageSecretName": + if r.TryDecodeAsNil() { + x.StorageSecretName = "" + } else { + yyv6 := &x.StorageSecretName + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "local": + if x.SnapshotStorageSpec.Local == nil { + x.SnapshotStorageSpec.Local = new(LocalSpec) + } + if r.TryDecodeAsNil() { + if x.Local != nil { + x.Local = nil + } + } else { + if x.Local == nil { + x.Local = new(LocalSpec) + } + x.Local.CodecDecodeSelf(d) + } + case "s3": + if x.SnapshotStorageSpec.S3 == nil { + x.SnapshotStorageSpec.S3 = new(S3Spec) + } + if r.TryDecodeAsNil() { + if x.S3 != nil { + x.S3 = nil + } + } else { + if x.S3 == nil { + x.S3 = new(S3Spec) + } + x.S3.CodecDecodeSelf(d) + } + case "gcs": + if x.SnapshotStorageSpec.GCS == nil { + x.SnapshotStorageSpec.GCS = new(GCSSpec) + } + if r.TryDecodeAsNil() { + if x.GCS != nil { + x.GCS = nil + } + } else { + if x.GCS == nil { + x.GCS = new(GCSSpec) + } + x.GCS.CodecDecodeSelf(d) + } + case "azure": + if x.SnapshotStorageSpec.Azure == nil { + x.SnapshotStorageSpec.Azure = new(AzureSpec) + } + if r.TryDecodeAsNil() { + if x.Azure != nil { + x.Azure = nil + } + } else { + if x.Azure == nil { + x.Azure = new(AzureSpec) + } + x.Azure.CodecDecodeSelf(d) + } + case "swift": + if x.SnapshotStorageSpec.Swift == nil { + x.SnapshotStorageSpec.Swift = new(SwiftSpec) + } + if r.TryDecodeAsNil() { + if x.Swift != nil { + x.Swift = nil + } + } else { + if x.Swift == nil { + x.Swift = new(SwiftSpec) + } + x.Swift.CodecDecodeSelf(d) + } + case "resources": + if r.TryDecodeAsNil() { + x.Resources = pkg1_v1.ResourceRequirements{} + } else { + yyv13 := &x.Resources + yyv13.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8190) +} + +func (x *BackupScheduleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.CronExpression = "" + } else { + yyv15 := &x.CronExpression + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.StorageSecretName = "" + } else { + yyv17 := &x.StorageSecretName + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + if x.SnapshotStorageSpec.Local == nil { + x.SnapshotStorageSpec.Local = new(LocalSpec) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Local != nil { + x.Local = nil + } + } else { + if x.Local == nil { + x.Local = new(LocalSpec) + } + x.Local.CodecDecodeSelf(d) + } + if x.SnapshotStorageSpec.S3 == nil { + x.SnapshotStorageSpec.S3 = new(S3Spec) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.S3 != nil { + x.S3 = nil + } + } else { + if x.S3 == nil { + x.S3 = new(S3Spec) + } + x.S3.CodecDecodeSelf(d) + } + if x.SnapshotStorageSpec.GCS == nil { + x.SnapshotStorageSpec.GCS = new(GCSSpec) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.GCS != nil { + x.GCS = nil + } + } else { + if x.GCS == nil { + x.GCS = new(GCSSpec) + } + x.GCS.CodecDecodeSelf(d) + } + if x.SnapshotStorageSpec.Azure == nil { + x.SnapshotStorageSpec.Azure = new(AzureSpec) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Azure != nil { + x.Azure = nil + } + } else { + if x.Azure == nil { + x.Azure = new(AzureSpec) + } + x.Azure.CodecDecodeSelf(d) + } + if x.SnapshotStorageSpec.Swift == nil { + x.SnapshotStorageSpec.Swift = new(SwiftSpec) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Swift != nil { + x.Swift = nil + } + } else { + if x.Swift == nil { + x.Swift = new(SwiftSpec) + } + x.Swift.CodecDecodeSelf(d) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Resources = pkg1_v1.ResourceRequirements{} + } else { + yyv24 := &x.Resources + yyv24.CodecDecodeSelf(d) + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + z.DecStructFieldNotFound(yyj14-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) +} + +func (x *SnapshotStorageSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [6]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.StorageSecretName != "" + yyq2[1] = x.Local != nil + yyq2[2] = x.S3 != nil + yyq2[3] = x.GCS != nil + yyq2[4] = x.Azure != nil + yyq2[5] = x.Swift != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(6) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.StorageSecretName)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("storageSecretName")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.StorageSecretName)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[1] { + if x.Local == nil { + r.EncodeNil() + } else { + x.Local.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("local")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if x.Local == nil { + r.EncodeNil() + } else { + x.Local.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[2] { + if x.S3 == nil { + r.EncodeNil() + } else { + x.S3.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("s3")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if x.S3 == nil { + r.EncodeNil() + } else { + x.S3.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[3] { + if x.GCS == nil { + r.EncodeNil() + } else { + x.GCS.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("gcs")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if x.GCS == nil { + r.EncodeNil() + } else { + x.GCS.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[4] { + if x.Azure == nil { + r.EncodeNil() + } else { + x.Azure.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("azure")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if x.Azure == nil { + r.EncodeNil() + } else { + x.Azure.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[5] { + if x.Swift == nil { + r.EncodeNil() + } else { + x.Swift.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("swift")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if x.Swift == nil { + r.EncodeNil() + } else { + x.Swift.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8190) + } + } + } +} + +func (x *SnapshotStorageSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8190 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8190) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8190 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8190) + } + } +} + +func (x *SnapshotStorageSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8190) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8190) + switch yys3 { + case "storageSecretName": + if r.TryDecodeAsNil() { + x.StorageSecretName = "" + } else { + yyv4 := &x.StorageSecretName + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "local": + if r.TryDecodeAsNil() { + if x.Local != nil { + x.Local = nil + } + } else { + if x.Local == nil { + x.Local = new(LocalSpec) + } + x.Local.CodecDecodeSelf(d) + } + case "s3": + if r.TryDecodeAsNil() { + if x.S3 != nil { + x.S3 = nil + } + } else { + if x.S3 == nil { + x.S3 = new(S3Spec) + } + x.S3.CodecDecodeSelf(d) + } + case "gcs": + if r.TryDecodeAsNil() { + if x.GCS != nil { + x.GCS = nil + } + } else { + if x.GCS == nil { + x.GCS = new(GCSSpec) + } + x.GCS.CodecDecodeSelf(d) + } + case "azure": + if r.TryDecodeAsNil() { + if x.Azure != nil { + x.Azure = nil + } + } else { + if x.Azure == nil { + x.Azure = new(AzureSpec) + } + x.Azure.CodecDecodeSelf(d) + } + case "swift": + if r.TryDecodeAsNil() { + if x.Swift != nil { + x.Swift = nil + } + } else { + if x.Swift == nil { + x.Swift = new(SwiftSpec) + } + x.Swift.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8190) +} + +func (x *SnapshotStorageSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.StorageSecretName = "" + } else { + yyv12 := &x.StorageSecretName + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + *((*string)(yyv12)) = r.DecodeString() + } + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Local != nil { + x.Local = nil + } + } else { + if x.Local == nil { + x.Local = new(LocalSpec) + } + x.Local.CodecDecodeSelf(d) + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.S3 != nil { + x.S3 = nil + } + } else { + if x.S3 == nil { + x.S3 = new(S3Spec) + } + x.S3.CodecDecodeSelf(d) + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.GCS != nil { + x.GCS = nil + } + } else { + if x.GCS == nil { + x.GCS = new(GCSSpec) + } + x.GCS.CodecDecodeSelf(d) + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Azure != nil { + x.Azure = nil + } + } else { + if x.Azure == nil { + x.Azure = new(AzureSpec) + } + x.Azure.CodecDecodeSelf(d) + } + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Swift != nil { + x.Swift = nil + } + } else { + if x.Swift == nil { + x.Swift = new(SwiftSpec) + } + x.Swift.CodecDecodeSelf(d) + } + for { + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l + } else { + yyb11 = r.CheckBreak() + } + if yyb11 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + z.DecStructFieldNotFound(yyj11-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) +} + +func (x *LocalSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = true + yyq2[1] = x.Path != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[0] { + yy4 := &x.VolumeSource + yy4.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("volumeSource")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yy6 := &x.VolumeSource + yy6.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[1] { + yym9 := z.EncBinary() + _ = yym9 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Path)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("path")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Path)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8190) + } + } + } +} + +func (x *LocalSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8190 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8190) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8190 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8190) + } + } +} + +func (x *LocalSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8190) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8190) + switch yys3 { + case "volumeSource": + if r.TryDecodeAsNil() { + x.VolumeSource = pkg1_v1.VolumeSource{} + } else { + yyv4 := &x.VolumeSource + yyv4.CodecDecodeSelf(d) + } + case "path": + if r.TryDecodeAsNil() { + x.Path = "" + } else { + yyv5 := &x.Path + yym6 := z.DecBinary() + _ = yym6 + if false { + } else { + *((*string)(yyv5)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8190) +} + +func (x *LocalSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.VolumeSource = pkg1_v1.VolumeSource{} + } else { + yyv8 := &x.VolumeSource + yyv8.CodecDecodeSelf(d) + } + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Path = "" + } else { + yyv9 := &x.Path + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + for { + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + z.DecStructFieldNotFound(yyj7-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) +} + +func (x *S3Spec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Endpoint != "" + yyq2[2] = x.Prefix != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Endpoint)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("endpoint")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Endpoint)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Bucket)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("bucket")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Bucket)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Prefix)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("prefix")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Prefix)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8190) + } + } + } +} + +func (x *S3Spec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8190 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8190) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8190 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8190) + } + } +} + +func (x *S3Spec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8190) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8190) + switch yys3 { + case "endpoint": + if r.TryDecodeAsNil() { + x.Endpoint = "" + } else { + yyv4 := &x.Endpoint + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "bucket": + if r.TryDecodeAsNil() { + x.Bucket = "" + } else { + yyv6 := &x.Bucket + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "prefix": + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv8 := &x.Prefix + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8190) +} + +func (x *S3Spec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Endpoint = "" + } else { + yyv11 := &x.Endpoint + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Bucket = "" + } else { + yyv13 := &x.Bucket + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv15 := &x.Prefix + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) +} + +func (x *GCSSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Prefix != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Bucket)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("bucket")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Bucket)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Prefix)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("prefix")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Prefix)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8190) + } + } + } +} + +func (x *GCSSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8190 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8190) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8190 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8190) + } + } +} + +func (x *GCSSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8190) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8190) + switch yys3 { + case "bucket": + if r.TryDecodeAsNil() { + x.Bucket = "" + } else { + yyv4 := &x.Bucket + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "prefix": + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv6 := &x.Prefix + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8190) +} + +func (x *GCSSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Bucket = "" + } else { + yyv9 := &x.Bucket + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv11 := &x.Prefix + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) +} + +func (x *AzureSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Container != "" + yyq2[1] = x.Prefix != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Container)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("container")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Container)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Prefix)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("prefix")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Prefix)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8190) + } + } + } +} + +func (x *AzureSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8190 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8190) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8190 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8190) + } + } +} + +func (x *AzureSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8190) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8190) + switch yys3 { + case "container": + if r.TryDecodeAsNil() { + x.Container = "" + } else { + yyv4 := &x.Container + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "prefix": + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv6 := &x.Prefix + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8190) +} + +func (x *AzureSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Container = "" + } else { + yyv9 := &x.Container + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv11 := &x.Prefix + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) +} + +func (x *SwiftSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Container != "" + yyq2[1] = x.Prefix != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Container)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("container")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Container)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Prefix)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("prefix")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Prefix)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8190) + } + } + } +} + +func (x *SwiftSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8190 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8190) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8190 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8190) + } + } +} + +func (x *SwiftSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8190) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8190) + switch yys3 { + case "container": + if r.TryDecodeAsNil() { + x.Container = "" + } else { + yyv4 := &x.Container + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "prefix": + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv6 := &x.Prefix + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8190) +} + +func (x *SwiftSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Container = "" + } else { + yyv9 := &x.Container + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Prefix = "" + } else { + yyv11 := &x.Prefix + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) +} + +func (x *MonitorSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Agent != "" + yyq2[1] = x.Prometheus != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Agent)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("agent")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Agent)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[1] { + if x.Prometheus == nil { + r.EncodeNil() + } else { + x.Prometheus.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("prometheus")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if x.Prometheus == nil { + r.EncodeNil() + } else { + x.Prometheus.CodecEncodeSelf(e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8190) + } + } + } +} + +func (x *MonitorSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8190 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8190) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8190 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8190) + } + } +} + +func (x *MonitorSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8190) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8190) + switch yys3 { + case "agent": + if r.TryDecodeAsNil() { + x.Agent = "" + } else { + yyv4 := &x.Agent + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "prometheus": + if r.TryDecodeAsNil() { + if x.Prometheus != nil { + x.Prometheus = nil + } + } else { + if x.Prometheus == nil { + x.Prometheus = new(PrometheusSpec) + } + x.Prometheus.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8190) +} + +func (x *MonitorSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Agent = "" + } else { + yyv8 := &x.Agent + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + if x.Prometheus != nil { + x.Prometheus = nil + } + } else { + if x.Prometheus == nil { + x.Prometheus = new(PrometheusSpec) + } + x.Prometheus.CodecDecodeSelf(d) + } + for { + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l + } else { + yyb7 = r.CheckBreak() + } + if yyb7 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + z.DecStructFieldNotFound(yyj7-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) +} + +func (x *PrometheusSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Namespace != "" + yyq2[1] = len(x.Labels) != 0 + yyq2[2] = x.Interval != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Namespace)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("namespace")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Namespace)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[1] { + if x.Labels == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncMapStringStringV(x.Labels, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("labels")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + if x.Labels == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + z.F.EncMapStringStringV(x.Labels, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem8190) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Interval)) + } + } else { + r.EncodeString(codecSelferC_UTF88190, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey8190) + r.EncodeString(codecSelferC_UTF88190, string("interval")) + z.EncSendContainerState(codecSelfer_containerMapValue8190) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x.Interval)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd8190) + } + } + } +} + +func (x *PrometheusSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap8190 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd8190) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray8190 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr8190) + } + } +} + +func (x *PrometheusSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey8190) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue8190) + switch yys3 { + case "namespace": + if r.TryDecodeAsNil() { + x.Namespace = "" + } else { + yyv4 := &x.Namespace + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "labels": + if r.TryDecodeAsNil() { + x.Labels = nil + } else { + yyv6 := &x.Labels + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + z.F.DecMapStringStringX(yyv6, false, d) + } + } + case "interval": + if r.TryDecodeAsNil() { + x.Interval = "" + } else { + yyv8 := &x.Interval + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd8190) +} + +func (x *PrometheusSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer8190 + 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 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Namespace = "" + } else { + yyv11 := &x.Namespace + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Labels = nil + } else { + yyv13 := &x.Labels + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + z.F.DecMapStringStringX(yyv13, false, d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + if r.TryDecodeAsNil() { + x.Interval = "" + } else { + yyv15 := &x.Interval + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem8190) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd8190) +} + +func (x DatabasePhase) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF88190, string(x)) + } +} + +func (x *DatabasePhase) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer8190 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} diff --git a/vendor/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go index 185e45263..a0a633d16 100644 --- a/vendor/github.com/spf13/cobra/command.go +++ b/vendor/github.com/spf13/cobra/command.go @@ -806,6 +806,7 @@ Simply type ` + c.Name() + ` help [path to command] for full details.`, // ResetCommands used for testing. func (c *Command) ResetCommands() { + c.parent = nil c.commands = nil c.helpCommand = nil c.parentsPflags = nil @@ -1132,6 +1133,9 @@ func (c *Command) LocalFlags() *flag.FlagSet { c.lflags.SetOutput(c.flagErrorBuf) } c.lflags.SortFlags = c.Flags().SortFlags + if c.globNormFunc != nil { + c.lflags.SetNormalizeFunc(c.globNormFunc) + } addToLocal := func(f *flag.Flag) { if c.lflags.Lookup(f.Name) == nil && c.parentsPflags.Lookup(f.Name) == nil { @@ -1156,6 +1160,10 @@ func (c *Command) InheritedFlags() *flag.FlagSet { } local := c.LocalFlags() + if c.globNormFunc != nil { + c.iflags.SetNormalizeFunc(c.globNormFunc) + } + c.parentsPflags.VisitAll(func(f *flag.Flag) { if c.iflags.Lookup(f.Name) == nil && local.Lookup(f.Name) == nil { c.iflags.AddFlag(f) @@ -1189,6 +1197,10 @@ func (c *Command) ResetFlags() { c.flags.SetOutput(c.flagErrorBuf) c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError) c.pflags.SetOutput(c.flagErrorBuf) + + c.lflags = nil + c.iflags = nil + c.parentsPflags = nil } // HasFlags checks if the command contains any flags (local plus persistent from the entire structure). @@ -1298,6 +1310,10 @@ func (c *Command) updateParentsPflags() { c.parentsPflags.SortFlags = false } + if c.globNormFunc != nil { + c.parentsPflags.SetNormalizeFunc(c.globNormFunc) + } + c.Root().PersistentFlags().AddFlagSet(flag.CommandLine) c.VisitParents(func(parent *Command) { diff --git a/vendor/github.com/spf13/pflag/flag.go b/vendor/github.com/spf13/pflag/flag.go index 7b84e2cde..b0eb4ffee 100644 --- a/vendor/github.com/spf13/pflag/flag.go +++ b/vendor/github.com/spf13/pflag/flag.go @@ -202,12 +202,18 @@ func sortFlags(flags map[NormalizedName]*Flag) []*Flag { func (f *FlagSet) SetNormalizeFunc(n func(f *FlagSet, name string) NormalizedName) { f.normalizeNameFunc = n f.sortedFormal = f.sortedFormal[:0] - for k, v := range f.orderedFormal { - delete(f.formal, NormalizedName(v.Name)) - nname := f.normalizeFlagName(v.Name) - v.Name = string(nname) - f.formal[nname] = v - f.orderedFormal[k] = v + for fname, flag := range f.formal { + nname := f.normalizeFlagName(flag.Name) + if fname == nname { + continue + } + flag.Name = string(nname) + delete(f.formal, fname) + f.formal[nname] = flag + if _, set := f.actual[fname]; set { + delete(f.actual, fname) + f.actual[nname] = flag + } } } @@ -440,13 +446,15 @@ func (f *FlagSet) Set(name, value string) error { return fmt.Errorf("invalid argument %q for %q flag: %v", value, flagName, err) } - if f.actual == nil { - f.actual = make(map[NormalizedName]*Flag) - } - f.actual[normalName] = flag - f.orderedActual = append(f.orderedActual, flag) + if !flag.Changed { + if f.actual == nil { + f.actual = make(map[NormalizedName]*Flag) + } + f.actual[normalName] = flag + f.orderedActual = append(f.orderedActual, flag) - flag.Changed = true + flag.Changed = true + } if flag.Deprecated != "" { fmt.Fprintf(f.out(), "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated) @@ -916,6 +924,9 @@ func (f *FlagSet) parseLongArg(s string, args []string, fn parseFunc) (a []strin } err = fn(flag, value) + if err != nil { + f.failf(err.Error()) + } return } @@ -966,6 +977,9 @@ func (f *FlagSet) parseSingleShortArg(shorthands string, args []string, fn parse } err = fn(flag, value) + if err != nil { + f.failf(err.Error()) + } return } diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go index 859313b34..785a059cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go @@ -2706,6 +2706,16 @@ func ValidatePodUpdate(newPod, oldPod *api.Pod) field.ErrorList { // handle updateable fields by munging those fields prior to deep equal comparison. mungedPod := *newPod + + // allow hostname and subdomain to be updated if they are empty. This allows for migration between the beta + // annotations and the GA field when upgrading between Kubernetes 1.6.x and 1.7.x. + if oldPod.Spec.Hostname == "" { + mungedPod.Spec.Hostname = oldPod.Spec.Hostname + } + if oldPod.Spec.Subdomain == "" { + mungedPod.Spec.Subdomain = oldPod.Spec.Subdomain + } + // munge spec.containers[*].image var newContainers []api.Container for ix, container := range mungedPod.Spec.Containers { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go index ea6ff569a..b10f973be 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go @@ -862,6 +862,20 @@ func DeploymentTimedOut(deployment *extensions.Deployment, newStatus *extensions if condition == nil { return false } + // If the previous condition has been a successful rollout then we shouldn't try to + // estimate any progress. Scenario: + // + // * progressDeadlineSeconds is smaller than the difference between now and the time + // the last rollout finished in the past. + // * the creation of a new ReplicaSet triggers a resync of the Deployment prior to the + // cached copy of the Deployment getting updated with the status.condition that indicates + // the creation of the new ReplicaSet. + // + // The Deployment will be resynced and eventually its Progressing condition will catch + // up with the state of the world. + if condition.Reason == NewRSAvailableReason { + return false + } if condition.Reason == TimedOutReason { return true } diff --git a/vendor/k8s.io/kubernetes/pkg/version/base.go b/vendor/k8s.io/kubernetes/pkg/version/base.go index 311b63d01..b8fd90d43 100644 --- a/vendor/k8s.io/kubernetes/pkg/version/base.go +++ b/vendor/k8s.io/kubernetes/pkg/version/base.go @@ -51,7 +51,7 @@ var ( // semantic version is a git hash, but the version itself is no // longer the direct output of "git describe", but a slight // translation to be semver compliant. - gitVersion string = "v1.7.6+$Format:%h$" + gitVersion string = "v1.7.7+$Format:%h$" gitCommit string = "$Format:%H$" // sha1 from git, output of $(git rev-parse HEAD) gitTreeState string = "not a git tree" // state of git tree, either "clean" or "dirty"